PHP Класс common\Language

This is useful for when you want to use the same code in the Back- and Frontend. For instance in a trait.
Наследование: extends Symfony\Component\Translation\IdentityTranslator
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
act ( $key ) : string Get an action.
callLanguageFunction ( $function, $parameters = [] ) : mixed
err ( $key ) : string Get an error.
get ( ) : string
lbl ( $key ) : string Get a label.
msg ( $key ) : string Get a message.
trans ( $id, array $parameters = [], $domain = null, $locale = null )

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

act() публичный статический Метод

Get an action.
public static act ( $key ) : string
$key
Результат string

callLanguageFunction() публичный статический Метод

public static callLanguageFunction ( $function, $parameters = [] ) : mixed
$function
$parameters
Результат mixed

err() публичный статический Метод

This only implements the key because the other parameters differ between the front- and backend.
public static err ( $key ) : string
$key
Результат string

get() публичный статический Метод

public static get ( ) : string
Результат string

lbl() публичный статический Метод

This only implements the key because the other parameters differ between the front- and backend.
public static lbl ( $key ) : string
$key
Результат string

msg() публичный статический Метод

This only implements the key because the other parameters differ between the front- and backend.
public static msg ( $key ) : string
$key
Результат string

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

public trans ( $id, array $parameters = [], $domain = null, $locale = null )
$parameters array