downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ResourceBundle::getErrorMessage> <ResourceBundle::create
[edit] Last updated: Fri, 25 May 2012

view this page in

ResourceBundle::getErrorCode

resourcebundle_get_error_code

(PHP >= 5.3.2, PECL intl >= 2.0.0)

ResourceBundle::getErrorCode -- resourcebundle_get_error_codeバンドルの直近のエラーコードを取得する

説明

オブジェクト指向型

int ResourceBundle::getErrorCode ( void )

手続き型

int resourcebundle_get_error_code ( ResourceBundle $r )

バンドルオブジェクトが最後に実行した関数のエラーコードを取得します。

パラメータ

r

ResourceBundle オブジェクト。

返り値

バンドルオブジェクトの最後の関数コールからのエラーコードを返します。

例1 resourcebundle_get_error_code() の例

<?php
$r 
resourcebundle_create'es'"/usr/share/data/myapp");
echo 
$r['somestring'];
if(
intl_is_failure(resourcebundle_get_error_code($r))) {
    
report_error("Bundle error");
}
?>

例2 オブジェクト指向の例

<?php
$r 
= new ResourceBundle'es'"/usr/share/data/myapp");
echo 
$r['somestring'];
if(
intl_is_failure(ResourceBundle::getErrorCode($r))) {
    
report_error("Bundle error");
}
?>

参考



add a note add a note User Contributed Notes ResourceBundle::getErrorCode
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites