PHP Класс Netson\L4gettext\L4gettext

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$encoding string variable holds the current encoding
$locale string variable holds the current locale

Открытые методы

Метод Описание
__construct ( ) constructor method accepts an optional $locale, otherwise the default will be used
__toString ( ) : string method to dump the current locale/encoding settings to string
createFolder ( string $path ) : L4gettext method which auto creates the LC_MESSAGES folder for each set locale, if they do not exist yet
getEncoding ( ) : string method to fetch the set encoding
getLocale ( ) : string method to fetch the set locale
getLocaleAndEncoding ( ) : string method to merge the locale and encoding into a single string
hasEncoding ( ) : boolean method to check if an encoding has been set
hasLocale ( ) : boolean method to check if a locale has been set
setEncoding ( string $encoding ) : L4gettext method to set the encoding
setLocale ( string $locale ) : L4gettext method to set the locale
setTextDomain ( string $textdomain, string $path ) : L4gettext method to set the text domain

Описание методов

__construct() публичный Метод

constructor method accepts an optional $locale, otherwise the default will be used
public __construct ( )

__toString() публичный Метод

method to dump the current locale/encoding settings to string
public __toString ( ) : string
Результат string

createFolder() публичный Метод

method which auto creates the LC_MESSAGES folder for each set locale, if they do not exist yet
public createFolder ( string $path ) : L4gettext
$path string
Результат L4gettext

getEncoding() публичный Метод

method to fetch the set encoding
public getEncoding ( ) : string
Результат string

getLocale() публичный Метод

method to fetch the set locale
public getLocale ( ) : string
Результат string

getLocaleAndEncoding() публичный Метод

method to merge the locale and encoding into a single string
public getLocaleAndEncoding ( ) : string
Результат string

hasEncoding() публичный Метод

method to check if an encoding has been set
public hasEncoding ( ) : boolean
Результат boolean

hasLocale() публичный Метод

method to check if a locale has been set
public hasLocale ( ) : boolean
Результат boolean

setEncoding() публичный Метод

method to set the encoding
public setEncoding ( string $encoding ) : L4gettext
$encoding string
Результат L4gettext

setLocale() публичный Метод

method to set the locale
public setLocale ( string $locale ) : L4gettext
$locale string
Результат L4gettext

setTextDomain() публичный Метод

method to set the text domain
public setTextDomain ( string $textdomain, string $path ) : L4gettext
$textdomain string
$path string
Результат L4gettext

Описание свойств

$encoding защищенное свойство

variable holds the current encoding
protected string $encoding
Результат string

$locale защищенное свойство

variable holds the current locale
protected string $locale
Результат string