PHP Класс Jyxo\Gettext\Parser

Автор: Matěj Humpál
Наследование: implements Iterator, implements Countable
Показать файл Открыть проект

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

Свойство Тип Описание
$current integer Internal pointer to the fragments array.
$file string Path to the parsed PO file.
$header string PO file header (copyright and other information).
$headerClass string Useful for subclassing.
$itemClass string Useful for subclassing.
$items Fragments parsed from the PO file.

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

Метод Описание
__call ( string $name, array $args ) : mixed Method overloading.
__construct ( string $file ) Constructor.
count ( ) : integer {@link \Countable} interface method
current ( ) : mixed {@link \ArrayIterator} interface method.
key ( ) : mixed {@link \ArrayIterator} interface method.
next ( ) {@link \ArrayIterator} interface method.
rewind ( ) {@link \ArrayIterator} interface method.
valid ( ) : boolean {@link \ArrayIterator} interface method.

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

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

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

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

Makes getProperty methods available for retrieving property values Makes setProperty methods available for setting property values
public __call ( string $name, array $args ) : mixed
$name string Method name
$args array Method parameters
Результат mixed Value of variable or \Jyxo\Gettext\Parser

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

Loads and parses the given file.
public __construct ( string $file )
$file string Path to the PO file.

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

{@link \Countable} interface method
public count ( ) : integer
Результат integer

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

{@link \ArrayIterator} interface method.
public current ( ) : mixed
Результат mixed

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

{@link \ArrayIterator} interface method.
public key ( ) : mixed
Результат mixed

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

{@link \ArrayIterator} interface method.
public next ( )

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

Walks through the file, splits it on empty lines and tries to parse each fragment using the defined parser class ({@link \Jyxo\Gettext\Parser\Item} by default). Does not work with the file header.
См. также: Jyxo\Gettext\Parser::$items
См. также: Jyxo\Gettext\Parser\Item
protected parse ( string $file )
$file string Path to the PO file

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

{@link \ArrayIterator} interface method.
public rewind ( )

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

{@link \ArrayIterator} interface method.
public valid ( ) : boolean
Результат boolean

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

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

Internal pointer to the fragments array.
protected int $current
Результат integer

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

Path to the parsed PO file.
protected string $file
Результат string

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

PO file header (copyright and other information).
protected string $header
Результат string

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

Useful for subclassing.
protected string $headerClass
Результат string

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

Useful for subclassing.
protected string $itemClass
Результат string

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

Fragments parsed from the PO file.
protected $items