Copied!

Handler

Handler.php : 14

Language Handler interface.

Methods

publiccreate()

Handler.php : 23

Create a new language.

public create(CreateStruct $struct) : Language

Parameters

Name Type Default value Description
$struct CreateStruct - -

Return values

Language

publicdelete()

Handler.php : 94

Delete a language.

public delete(mixed $id) : mixed

Parameters

Name Type Default value Description
$id mixed - -
Tags
Throws
LogicException

If language could not be deleted

publicload()

Handler.php : 41

Get language by id.

public load(mixed $id) : Language

Parameters

Name Type Default value Description
$id mixed - -

Return values

Language

Tags
Throws
NotFoundException

If language could not be found by $id

publicloadAll()

Handler.php : 85

Get all languages.

public loadAll() : array<string|int, Language>

Return list of languages where key of hash is language code.

Return values

array<string|int, Language>

publicloadByLanguageCode()

Handler.php : 64

Get language by Language Code (eg: eng-GB).

public loadByLanguageCode(string $languageCode) : Language

Parameters

Name Type Default value Description
$languageCode string - -

Return values

Language

Tags
Throws
NotFoundException

If language could not be found by $languageCode

publicloadList()

Handler.php : 53

Get list of languages by id.

public loadList(array<string|int, mixed> $ids) : array<string|int, Language>|iterable<string|int, mixed>

Missing items (NotFound) will be missing from the returned iterable and not cause an exception, it's up to calling logic to determine if this should cause exception or not.

Parameters

Name Type Default value Description
$ids array<string|int, mixed> - -

Return values

array<string|int, Language>|iterable<string|int, mixed>

publicloadListByLanguageCodes()

Handler.php : 76

Get list of languages by Language Code (eg: eng-GB).

public loadListByLanguageCodes(array<string|int, string> $languageCodes) : array<string|int, Language>|iterable<string|int, mixed>

Missing items (NotFound) will be missing from the returned iterable and not cause an exception, it's up to calling logic to determine if this should cause exception or not.

Parameters

Name Type Default value Description
$languageCodes array<string|int, string> - -

Return values

array<string|int, Language>|iterable<string|int, mixed>

publicupdate()

Handler.php : 30

Update language.

public update(Language $struct) : mixed

Parameters

Name Type Default value Description
$struct Language - -