PHP Класс Latte\TokenIterator

Наследование: use trait latte\Strict
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$ignored array
$position integer
$tokens array

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

Метод Описание
__construct ( array $tokens )
currentToken ( ) : array | null Returns current token.
currentValue ( ) : string | null Returns current token value.
expectNextValue ( ) : string Returns next expected token or throws exception.
isCurrent ( $arg ) : boolean Checks the current token.
isNext ( ) : boolean Checks the next token existence.
isPrev ( ) : boolean Checks the previous token existence.
joinAll ( ) : string Returns concatenation of all next token values.
joinUntil ( $arg ) : string Returns concatenation of all next tokens until it sees a given token type or value.
nextAll ( ) : array[] Returns all next tokens.
nextToken ( ) : array | null Returns next token.
nextUntil ( $arg ) : array[] Returns all next tokens until it sees a given token type or value.
nextValue ( ) : string | null Returns next token value.
reset ( ) : static

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

Метод Описание
next ( ) Moves cursor to next token.
scan ( $wanted, $onlyFirst, $advance, $strings = FALSE, $until = FALSE, $prev = FALSE ) : mixed Looks for (first) (not) wanted tokens.

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

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

public __construct ( array $tokens )
$tokens array

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

Returns current token.
public currentToken ( ) : array | null
Результат array | null

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

Returns current token value.
public currentValue ( ) : string | null
Результат string | null

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

Returns next expected token or throws exception.
public expectNextValue ( ) : string
Результат string

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

Checks the current token.
public isCurrent ( $arg ) : boolean
Результат boolean

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

Checks the next token existence.
public isNext ( ) : boolean
Результат boolean

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

Checks the previous token existence.
public isPrev ( ) : boolean
Результат boolean

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

Returns concatenation of all next token values.
public joinAll ( ) : string
Результат string

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

Returns concatenation of all next tokens until it sees a given token type or value.
public joinUntil ( $arg ) : string
Результат string

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

Moves cursor to next token.
protected next ( )

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

Returns all next tokens.
public nextAll ( ) : array[]
Результат array[]

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

Returns next token.
public nextToken ( ) : array | null
Результат array | null

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

Returns all next tokens until it sees a given token type or value.
public nextUntil ( $arg ) : array[]
Результат array[]

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

Returns next token value.
public nextValue ( ) : string | null
Результат string | null

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

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

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

Looks for (first) (not) wanted tokens.
protected scan ( $wanted, $onlyFirst, $advance, $strings = FALSE, $until = FALSE, $prev = FALSE ) : mixed
Результат mixed

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

$ignored публичное свойство

public array $ignored
Результат array

$position публичное свойство

public int $position
Результат integer

$tokens публичное свойство

public array $tokens
Результат array