Flow\Parser::parseFilterExpression PHP Метод

parseFilterExpression() защищенный Метод

protected parseFilterExpression ( $node )
    protected function parseFilterExpression($node)
    {
        $line = $this->stream->getCurrentToken()->getLine();
        $filters = array();
        while ($this->stream->test(Token::OPERATOR, '|')) {
            $this->stream->next();
            $token = $this->stream->expect(Token::NAME);
            $args = array();
            if ($this->stream->test(Token::OPERATOR, '(')) {
                $this->stream->next();
                while (!$this->stream->test(Token::OPERATOR, ')')) {
                    if (!empty($args)) {
                        $this->stream->expect(Token::OPERATOR, ',');
                        if ($this->stream->test(Token::OPERATOR, ')')) {
                            break;
                        }
                    }
                    $args[] = $this->parseExpression();
                }
                $this->stream->expect(Token::OPERATOR, ')');
            }
            $filters[] = array($token->getValue(), $args);
        }
        return new Expression\FilterExpression($node, $filters, false, $line);
    }