PHP 클래스 Jyxo\Gettext\Parser

저자: Matěj Humpál
상속: implements Iterator, implements Countable
파일 보기 프로젝트 열기: jyxo/php

보호된 프로퍼티들

프로퍼티 타입 설명
$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