PEEL Shopping
Open source ecommerce : PEEL Shopping
Public Member Functions | Protected Attributes
Twig_TokenStream Class Reference

Represents a token stream. More...

Public Member Functions

 __construct (array $tokens, $filename=null)
 Constructor. More...
 
 __toString ()
 Returns a string representation of the token stream. More...
 
 injectTokens (array $tokens)
 
 next ()
 Sets the pointer to the next token and returns the old one. More...
 
 expect ($type, $value=null, $message=null)
 Tests a token and returns it or throws a syntax error. More...
 
 look ($number=1)
 Looks at the next token. More...
 
 test ($primary, $secondary=null)
 Tests the current token. More...
 
 isEOF ()
 Checks if end of stream was reached. More...
 
 getCurrent ()
 Gets the current token. More...
 
 getFilename ()
 Gets the filename associated with this stream. More...
 

Protected Attributes

 $tokens
 
 $current
 
 $filename
 

Detailed Description

Represents a token stream.

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 18 of file TokenStream.php.

Constructor & Destructor Documentation

__construct ( array  $tokens,
  $filename = null 
)

Constructor.

Parameters
array$tokensAn array of tokens
string$filenameThe name of the filename which tokens are associated with

Definition at line 30 of file TokenStream.php.

Member Function Documentation

__toString ( )

Returns a string representation of the token stream.

Returns
string

Definition at line 42 of file TokenStream.php.

expect (   $type,
  $value = null,
  $message = null 
)

Tests a token and returns it or throws a syntax error.

Returns
Twig_Token

Definition at line 71 of file TokenStream.php.

getCurrent ( )

Gets the current token.

Returns
Twig_Token

Definition at line 130 of file TokenStream.php.

getFilename ( )

Gets the filename associated with this stream.

Returns
string

Definition at line 140 of file TokenStream.php.

injectTokens ( array  $tokens)

Definition at line 47 of file TokenStream.php.

isEOF ( )

Checks if end of stream was reached.

Returns
bool

Definition at line 120 of file TokenStream.php.

look (   $number = 1)

Looks at the next token.

Parameters
integer$number
Returns
Twig_Token

Definition at line 96 of file TokenStream.php.

next ( )

Sets the pointer to the next token and returns the old one.

Returns
Twig_Token

Definition at line 57 of file TokenStream.php.

test (   $primary,
  $secondary = null 
)

Tests the current token.

Returns
bool

Definition at line 110 of file TokenStream.php.

Field Documentation

$current
protected

Definition at line 21 of file TokenStream.php.

$filename
protected

Definition at line 22 of file TokenStream.php.

$tokens
protected

Definition at line 20 of file TokenStream.php.


The documentation for this class was generated from the following file:

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:45 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.