PHP Class Nelmio\Alice\FixtureBuilder\ExpressionLanguage\Lexer\FunctionTreeTokenizer

Inheritance: use trait Nelmio\Alice\IsAServiceTrait
Show file Open project: nelmio/alice

Public Methods

Method Description
detokenize ( string $value ) : string Replaces the tokens by their original values.
functionIsNotClosed ( array $functions ) : boolean
isClosingToken ( string $value ) : boolean
isOpeningToken ( string $value ) : boolean
isTheLastFunction ( array $functions ) : boolean
tokenize ( string $value ) : array Replaces the function delimiters by tokens to easily identify them in the future and return the value splat into tokens.

Method Details

detokenize() public method

Replaces the tokens by their original values.
public detokenize ( string $value ) : string
$value string
return string

functionIsNotClosed() public method

public functionIsNotClosed ( array $functions ) : boolean
$functions array
return boolean

isClosingToken() public method

public isClosingToken ( string $value ) : boolean
$value string
return boolean

isOpeningToken() public method

public isOpeningToken ( string $value ) : boolean
$value string
return boolean

isTheLastFunction() public method

public isTheLastFunction ( array $functions ) : boolean
$functions array
return boolean

tokenize() public method

Example: 'foo )> bar' will result in: [ 'foo ', 'FUNCTION_START__f__', 'FUNCTION_START__g__', 'IDENTITY_OR_FUNCTION_END', 'IDENTITY_OR_FUNCTION_END', ' bar', ]
public tokenize ( string $value ) : array
$value string
return array