class Locale extends BaseResource

Value object encoding a locale.

Properties

protected Locale $sys
protected string $code
protected string $name
protected string|null $fallbackCode
protected bool $default

Methods

__construct(array $data)

Resources in this SDK should not be built using $new Class().

Link
asLink()

{@inheritdoc}

string
getId()

{@inheritdoc}

string
getType()

{@inheritdoc}

getSystemProperties()

{@inheritdoc}

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|null
getFallbackCode()

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

array
jsonSerialize()

{@inheritdoc}

Details

in BaseResource at line 26
protected __construct(array $data)

Resources in this SDK should not be built using $new Class().

This method is only useful in testing environments, where the resource needs to be subclasses and this method made public.

Parameters

array $data

{@inheritdoc}

Return Value

Link

in BaseResource at line 49
string getId()

{@inheritdoc}

Return Value

string

in BaseResource at line 57
string getType()

{@inheritdoc}

Return Value

string

at line 49
Locale getSystemProperties()

{@inheritdoc}

Return Value

Locale

at line 59
string getCode()

Returns the locale code.

Return Value

string

at line 69
string getName()

Returns the human readable name.

Return Value

string

at line 79
bool isDefault()

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

Return Value

bool

at line 89
string|null getFallbackCode()

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

Return Value

string|null

at line 97
array jsonSerialize()

{@inheritdoc}

Return Value

array