LanguageProvider
in package
implements
LanguageProviderInterface
Class LanguageProvider
Tags
Interfaces, Classes and Traits
- LanguageProviderInterface
- Interface LanguageProviderInterface
Table of Contents
- $db : CI_DB_query_builder
- Database connection.
- __construct() : mixed
- LanguageProvider constructor.
- getActiveCodes() : KeyValueCollection
- Returns the active language codes.
- getAdminCodes() : KeyValueCollection
- Returns the language codes for languages enabled for administration
- getAdminIds() : IdCollection
- Returns the language IDs for languages enabled for administrative purposes.
- 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.
- getIdByDirectory() : int
- Returns the language id of the provided directory name.
- getIds() : IdCollection
- Returns the language IDs.
Properties
$db
Database connection.
protected
CI_DB_query_builder
$db
Methods
__construct()
LanguageProvider constructor.
public
__construct(CI_DB_query_builder $db) : mixed
Parameters
- $db : CI_DB_query_builder
-
Database connection.
Return values
mixed —getActiveCodes()
Returns the active language codes.
public
getActiveCodes() : KeyValueCollection
Tags
Return values
KeyValueCollection —getAdminCodes()
Returns the language codes for languages enabled for administration
public
getAdminCodes() : KeyValueCollection
Return values
KeyValueCollection —getAdminIds()
Returns the language IDs for languages enabled for administrative purposes.
public
getAdminIds() : IdCollection
Tags
Return values
IdCollection —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
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
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
Return values
LanguageCode —getCodes()
Returns the language codes.
public
getCodes() : KeyValueCollection
Tags
Return values
KeyValueCollection —getDefaultLanguageCode()
Returns the default language code.
public
getDefaultLanguageCode() : string
Tags
Return values
string —getDefaultLanguageId()
Returns the default language ID.
public
getDefaultLanguageId() : int
Tags
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
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
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
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
Return values
int —getIdByDirectory()
Returns the language id of the provided directory name.
public
getIdByDirectory(StringType $directory) : int
Parameters
- $directory : StringType
-
Name of directory.
Tags
Return values
int —getIds()
Returns the language IDs.
public
getIds() : IdCollection