phpDocumentor

LanguageProviderInterface

Interface LanguageProviderInterface

Tags
category

System

subpackage

Interfaces

Table of Contents

getActiveCodes()  : KeyValueCollection
Returns the active language codes.
getCharsetByCode()  : string
Returns the charset from the a specific language, selected by the language code.
getCharsetById()  : string
Returns the charset from the a specific language, selected by the language ID.
getCodeById()  : LanguageCode
Returns the language code from a specific language, selected by the language ID.
getCodes()  : KeyValueCollection
Returns the language codes.
getDefaultLanguageCode()  : string
Returns the default language code.
getDefaultLanguageId()  : int
Returns the default language ID.
getDirectoryByCode()  : string
Returns the directory from the a specific language, selected by the language code.
getDirectoryById()  : string
Returns the directory from the a specific language, selected by the language ID.
getIconFilenameByCode()  : string
Returns the icon for a specific language by a given language code.
getIdByCode()  : int
Returns the ID from the a specific language, selected by the language code.
getIds()  : IdCollection
Returns the language IDs.

Methods

getCharsetByCode()

Returns the charset from the a specific language, selected by the language code.

public getCharsetByCode(LanguageCode $code) : string
Parameters
$code : LanguageCode

Language code.

Tags
throws
UnexpectedValueException

If no directory has been found.

Return values
string

getCharsetById()

Returns the charset from the a specific language, selected by the language ID.

public getCharsetById(IdType $id) : string
Parameters
$id : IdType

Language ID.

Tags
throws
UnexpectedValueException

If no charset has been found.

Return values
string

getCodeById()

Returns the language code from a specific language, selected by the language ID.

public getCodeById(IdType $id) : LanguageCode
Parameters
$id : IdType

Language ID.

Tags
throws
InvalidArgumentException

If code is not valid.

throws
UnexpectedValueException

If no code has been found.

Return values
LanguageCode

getDefaultLanguageCode()

Returns the default language code.

public getDefaultLanguageCode() : string
Tags
throws
InvalidArgumentException

If no default code exists.

Return values
string

getDefaultLanguageId()

Returns the default language ID.

public getDefaultLanguageId() : int
Tags
throws
InvalidArgumentException

If no default code exists.

Return values
int

getDirectoryByCode()

Returns the directory from the a specific language, selected by the language code.

public getDirectoryByCode(LanguageCode $code) : string
Parameters
$code : LanguageCode

Language code.

Tags
throws
UnexpectedValueException

If no directory has been found.

Return values
string

getDirectoryById()

Returns the directory from the a specific language, selected by the language ID.

public getDirectoryById(IdType $id) : string
Parameters
$id : IdType

Language ID.

Tags
throws
InvalidArgumentException

If code is not valid.

throws
UnexpectedValueException

If no directory has been found.

Return values
string

getIconFilenameByCode()

Returns the icon for a specific language by a given language code.

public getIconFilenameByCode(LanguageCode $code) : string
Parameters
$code : LanguageCode

The given language code

Tags
throws
UnexpectedValueException

If no icon has been found.

Return values
string

getIdByCode()

Returns the ID from the a specific language, selected by the language code.

public getIdByCode(LanguageCode $code) : int
Parameters
$code : LanguageCode

Language code.

Tags
throws
UnexpectedValueException

If no ID has been found.

Return values
int

Search results