Method |
Description |
|
__construct ( $options = [] ) |
Constructor |
|
__toString ( ) : string |
Returns the stream source code. |
|
count ( ) : integer |
Counts the items of the object. |
|
current ( $token = false ) : array | string |
Returns the current token or the token value. |
|
getName ( integer $index = null ) : string | null |
Returns the token type name. |
|
getType ( integer $index = null ) : mixed |
Returns the type of a token. |
|
getValue ( integer $index = null ) : string | null |
Returns the current token value. |
|
is ( integer | string $type, integer $index = null ) : boolean |
Checks if there is a token of the given type at the given position. |
|
key ( ) : integer |
Returns the current internal pointer value. |
|
load ( string $source, $options = [] ) |
Load the stream using a string (destroy previous loaded tokens) |
|
next ( mixed $type = false ) : string | null |
Move to the next token of a given type. |
|
nextMatchingBracket ( ) : string | null |
Move to the next matching bracket. |
|
nextSequence ( $sequence ) : array | null |
Moves to the next sequence of tokens. |
|
offsetExists ( integer $offset ) : boolean |
Checks of there is a token with the given index. |
|
offsetGet ( integer $offset ) : array |
Returns a token at the given index. |
|
offsetSet ( $offset, $value ) |
Unsupported |
|
offsetUnset ( $offset ) |
Unsupported |
|
prev ( $token = false ) : array | string |
Move to previous. |
|
rewind ( $token = false ) : array | string |
Sets the internal pointer to zero. |
|
seek ( integer $index, $token = false ) : array | string |
Move to a specific index. |
|
skipWhile ( array $skips = [] ) : The |
Skips elements until an element doesn't match the elements in the passed array. |
|
skipWhitespaces ( boolean $skipComment = false ) : The |
Skips whitespaces and comments next to the current position. |
|
source ( mixed $start = null, mixed $end = null ) : string |
Returns the stream content. |
|
valid ( ) : boolean |
Checks if there is a token on the current position. |
|