class Space implements JsonSerializable

The Space class represents a single space identified by it's ID and holding some metadata.

Methods

__construct(string $name, array $locales, SystemProperties $sys)

Space constructor.

string
getName()

Returns the name of this space.

Locale[]
getLocales()

Returns the list of all locales supported by this Space.

getLocale($localeCode)

No description

getDefaultLocale()

Returns the default locale for this space.

string|null
getId()

Returns the id of this space.

object
jsonSerialize()

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

Details

at line 49
__construct(string $name, array $locales, SystemProperties $sys)

Space constructor.

Parameters

string $name name of this space
array $locales locales supported by this space
SystemProperties $sys metadata for this space

at line 68
string getName()

Returns the name of this space.

Return Value

string

at line 78
Locale[] getLocales()

Returns the list of all locales supported by this Space.

Return Value

Locale[]

at line 90
Locale getLocale($localeCode)

Parameters

$localeCode string Code of the locale to fetch the object for

Return Value

Locale

Exceptions

RuntimeException When no locale with the given code exists

at line 104
Locale getDefaultLocale()

Returns the default locale for this space.

Return Value

Locale

at line 114
string|null getId()

Returns the id of this space.

Return Value

string|null

at line 126
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