PHP 클래스 Latte\TokenIterator

상속: use trait latte\Strict
파일 보기 프로젝트 열기: nette/latte

공개 프로퍼티들

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