class IntlGlobals

Provides fake static versions of the global functions in the intl extension

Constants

U_ZERO_ERROR

Indicates that no error occurred

U_ILLEGAL_ARGUMENT_ERROR

Indicates that an invalid argument was passed

U_PARSE_ERROR

Indicates that the parse() operation failed

Methods

static Boolean
isFailure(integer $errorCode)

Returns whether the error code indicates a failure

static integer
getErrorCode()

Returns the error code of the last operation

static string
getErrorMessage()

Returns the error message of the last operation

static string
getErrorName(integer $code)

Returns the symbolic name for a given error code

static 
setError(integer $code, string $message = '')

Sets the current error

Details

at line line 74
static Boolean isFailure(integer $errorCode)

Returns whether the error code indicates a failure

Parameters

integer $errorCode The error code returned by IntlGlobals::getErrorCode()

Return Value

Boolean

at line line 87
static integer getErrorCode()

Returns the error code of the last operation

Returns IntlGlobals::UZEROERROR if no error occurred.

Return Value

integer

at line line 99
static string getErrorMessage()

Returns the error message of the last operation

Returns "UZEROERROR" if no error occurred.

Return Value

string

at line line 111
static string getErrorName(integer $code)

Returns the symbolic name for a given error code

Parameters

integer $code The error code returned by IntlGlobals::getErrorCode()

Return Value

string

at line line 128
static setError(integer $code, string $message = '')

Sets the current error

Parameters

integer $code One of the error constants in this class
string $message The ICU class error message

Exceptions

InvalidArgumentException If the code is not one of the error constants in this class