class Locale implements JsonSerializable

Value object encoding a locale.

Methods

__construct(string $code, string $name, string $fallbackCode, bool $default = false)

Locale constructor.

string
getCode()

Returns the locale code.

string
getName()

Returns the human readable name.

bool
isDefault()

Returns true if this is the default locale for the space.

string
getFallbackCode()

Returns the code of the locale used for for the fallback.

object
jsonSerialize()

Returns an object to be used by json_encode to serialize objects of this class.

Details

at line 45
__construct(string $code, string $name, string $fallbackCode, bool $default = false)

Locale constructor.

Parameters

string $code Locale code
string $name Human readable name
string $fallbackCode The code of the locale used for for the fallback
bool $default Whether this is the default locale

at line 58
string getCode()

Returns the locale code.

Return Value

string

at line 68
string getName()

Returns the human readable name.

Return Value

string

at line 78
bool isDefault()

Returns true if this is the default locale for the space.

Return Value

bool

at line 88
string getFallbackCode()

Returns the code of the locale used for for the fallback.

Return Value

string

at line 100
object jsonSerialize()

Returns an object to be used by json_encode to serialize objects of this class.

Return Value

object

See also

http://php.net/manual/en/jsonserializable.jsonserialize.php JsonSerializable::jsonSerialize