Пример #1
0
 /**
  * @inheritdoc
  */
 public function parse(TokenStream $tokenStream)
 {
     if ($tokenStream->test(Token::T_GLOB)) {
         return new Glob($tokenStream->next()->getValue());
     }
     if ($tokenStream->nextIf(Token::T_TYPE, 'glob')) {
         $tokenStream->expect(Token::T_COLON);
     }
     return new Glob(Glob::encode($tokenStream->expect(static::$allowedTypes)->getValue()));
 }
 /**
  * @inheritdoc
  */
 public function supports(TokenStream $tokenStream)
 {
     return $tokenStream->test(Token::T_OPERATOR, $this->getOperatorName());
 }
Пример #3
0
 public function supports(TokenStream $tokenStream)
 {
     return $tokenStream->test(Token::T_OPERATOR, 'groupby');
 }
 public function supports(TokenStream $tokenStream)
 {
     return $tokenStream->test(Token::T_OPERATOR, 'elemMatch');
 }
Пример #5
0
 /**
  * @inheritdoc
  */
 public function supports(TokenStream $tokenStream)
 {
     return $tokenStream->test(Token::T_OPEN_PARENTHESIS);
 }
 /**
  * @inheritdoc
  */
 public function supports(TokenStream $tokenStream)
 {
     return $tokenStream->test(Token::T_STRING) && $tokenStream->lookAhead()->test(Token::T_OPERATOR, $this->getOperatorNames());
 }