(PHP >= 5.3.2, PECL intl >= 2.0.0)
Get bundle's last error code.
public int ResourceBundle::getErrorCode ( void )
Object oriented style
Procedural style
Get error code from the last function performed by the bundle object.
Parameters:
r
ResourceBundle object.
Returns:
Returns error code from last bundle object call.
Examples:
resourcebundle_get_error_code() example
1 2 3 4 5 6 7 | <?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" ); } ?> |
OO example
1 2 3 4 5 6 7 | <?php $r = new ResourceBundle( 'es' , "/usr/share/data/myapp" ); echo $r [ 'somestring' ]; if (intl_is_failure(ResourceBundle::getErrorCode( $r ))) { report_error( "Bundle error" ); } ?> |
See also:
Please login to continue.