PHP Класс Jyxo\Gettext\Parser\Item

Автор: Matěj Humpál
Показать файл Открыть проект

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

Свойство Тип Описание
$fuzzy boolean Is msgid fuzzy?
$location string Msgid position in the source code.
$msgid string Msgid.
$msgstr string | array For each plural form one array field. If there is only one translation (no plural forms), it is stored as a string.
$obsolete boolean Is msgid obsolete?
$plural string Plural forms.

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

Метод Описание
__construct ( string $chunk ) Constructor.
getLocation ( ) : string | array Returns msgid's position in source codes.
getMsgid ( ) : string | array Returns msgid.
getMsgstr ( ) : string | array Returns msgstr.
getPlural ( ) : string Returns plural translations.
hasPlural ( ) : boolean Returns whether the msgid has plural forms.
isFuzzy ( ) : boolean Returns whether the msgid is fuzzy.
isObsolete ( ) : boolean Returns whether the msgid is obsolete.

Защищенные методы

Метод Описание
parse ( array $chunks ) The actual parser.

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

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

Retrieves a fragment of the PO file and parses it.
public __construct ( string $chunk )
$chunk string Translation fragment

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

Returns msgid's position in source codes.
public getLocation ( ) : string | array
Результат string | array

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

Returns msgid.
public getMsgid ( ) : string | array
Результат string | array

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

Returns msgstr.
public getMsgstr ( ) : string | array
Результат string | array

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

Returns plural translations.
public getPlural ( ) : string
Результат string

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

Returns whether the msgid has plural forms.
public hasPlural ( ) : boolean
Результат boolean

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

Returns whether the msgid is fuzzy.
public isFuzzy ( ) : boolean
Результат boolean

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

Returns whether the msgid is obsolete.
public isObsolete ( ) : boolean
Результат boolean

parse() защищенный Метод

The actual parser.
protected parse ( array $chunks )
$chunks array Lines of the PO file fragment

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

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

Is msgid fuzzy?
protected bool $fuzzy
Результат boolean

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

Msgid position in the source code.
protected string $location
Результат string

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

Msgid.
protected string $msgid
Результат string

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

For each plural form one array field. If there is only one translation (no plural forms), it is stored as a string.
protected string|array $msgstr
Результат string | array

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

Is msgid obsolete?
protected bool $obsolete
Результат boolean

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

Plural forms.
protected string $plural
Результат string