Handler
Language Handler interface.
Methods¶
create()
¶
Create a new language.
|
|
|
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $struct | CreateStruct | - | - |
Return values
delete()
¶
Delete a language.
|
|
|
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $id | mixed | - | - |
Tags
load()
¶
Get language by id.
|
|
|
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $id | mixed | - | - |
Return values
Tags
loadAll()
¶
Get all languages.
|
|
|
Return list of languages where key of hash is language code.
Return values
array<string|int, Language>
loadByLanguageCode()
¶
Get language by Language Code (eg: eng-GB).
|
|
|
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $languageCode | string | - | - |
Return values
Tags
loadList()
¶
Get list of languages by id.
|
|
|
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>
loadListByLanguageCodes()
¶
Get list of languages by Language Code (eg: eng-GB).
|
|
|
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>
update()
¶
Update language.
|
|
|
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $struct | Language | - | - |