PHP Class Latte\TokenIterator

Inheritance: use trait latte\Strict
Afficher le fichier Open project: nette/latte

Méthodes publiques

Свойство Type Description
$ignored array
$position integer
$tokens array

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
next ( ) Moves cursor to next token.
scan ( $wanted, $onlyFirst, $advance, $strings = FALSE, $until = FALSE, $prev = FALSE ) : mixed Looks for (first) (not) wanted tokens.

Method Details

__construct() public méthode

public __construct ( array $tokens )
$tokens array

currentToken() public méthode

Returns current token.
public currentToken ( ) : array | null
Résultat array | null

currentValue() public méthode

Returns current token value.
public currentValue ( ) : string | null
Résultat string | null

expectNextValue() public méthode

Returns next expected token or throws exception.
public expectNextValue ( ) : string
Résultat string

isCurrent() public méthode

Checks the current token.
public isCurrent ( $arg ) : boolean
Résultat boolean

isNext() public méthode

Checks the next token existence.
public isNext ( ) : boolean
Résultat boolean

isPrev() public méthode

Checks the previous token existence.
public isPrev ( ) : boolean
Résultat boolean

joinAll() public méthode

Returns concatenation of all next token values.
public joinAll ( ) : string
Résultat string

joinUntil() public méthode

Returns concatenation of all next tokens until it sees a given token type or value.
public joinUntil ( $arg ) : string
Résultat string

next() protected méthode

Moves cursor to next token.
protected next ( )

nextAll() public méthode

Returns all next tokens.
public nextAll ( ) : array[]
Résultat array[]

nextToken() public méthode

Returns next token.
public nextToken ( ) : array | null
Résultat array | null

nextUntil() public méthode

Returns all next tokens until it sees a given token type or value.
public nextUntil ( $arg ) : array[]
Résultat array[]

nextValue() public méthode

Returns next token value.
public nextValue ( ) : string | null
Résultat string | null

reset() public méthode

public reset ( ) : static
Résultat static

scan() protected méthode

Looks for (first) (not) wanted tokens.
protected scan ( $wanted, $onlyFirst, $advance, $strings = FALSE, $until = FALSE, $prev = FALSE ) : mixed
Résultat mixed

Property Details

$ignored public_oe property

public array $ignored
Résultat array

$position public_oe property

public int $position
Résultat integer

$tokens public_oe property

public array $tokens
Résultat array