detokenize() public method

public detokenize ( string $value ) : string
$value string
return string
 /**
  * Parses '<<', '@@'...
  *
  * {@inheritdoc}
  */
 public function parse(Token $token) : string
 {
     $value = $token->getValue();
     if ('' === $value) {
         throw ExpressionLanguageExceptionFactory::createForUnparsableToken($token);
     }
     return $this->tokenizer->detokenize(substr($value, 1));
 }
Beispiel #2
0
 /**
  * Parses expressions such as '<(something)>'.
  *
  * {@inheritdoc}
  *
  * @throws ParseException
  */
 public function parse(Token $token)
 {
     $value = $this->tokenizer->detokenize($token->getValue());
     $realValue = preg_replace('/^<\\((.*)\\)>$/', '<identity($1)>', $value);
     return $this->decoratedTokenParser->parse(new Token($realValue, new TokenType(TokenType::FUNCTION_TYPE)));
 }