StubIntl deprecated

class StubIntl extends IntlGlobals

deprecated

since version 2.3, to be removed in 3.0. Use {@link \Symfony\Component\Intl\Globals\IntlGlobals} instead.

Alias of {@link \Symfony\Component\Intl\Globals\IntlGlobals}.

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 bool isFailure(int $errorCode)

Returns whether the error code indicates a failure.

from IntlGlobals
static int getErrorCode()

Returns the error code of the last operation.

from IntlGlobals
static string getErrorMessage()

Returns the error message of the last operation.

from IntlGlobals
static string getErrorName(int $code)

Returns the symbolic name for a given error code.

from IntlGlobals
static setError(int $code, string $message = '')

Sets the current error.

from IntlGlobals

Details

static bool isFailure(int $errorCode)

Returns whether the error code indicates a failure.

Parameters

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

Return Value

bool

static int getErrorCode()

Returns the error code of the last operation.

Returns IntlGlobals::UZEROERROR if no error occurred.

Return Value

int

static string getErrorMessage()

Returns the error message of the last operation.

Returns "UZEROERROR" if no error occurred.

Return Value

string

static string getErrorName(int $code)

Returns the symbolic name for a given error code.

Parameters

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

Return Value

string

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

Sets the current error.

Parameters

int $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

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Locale/Stub/StubIntl.html