Doctrine\ORM\Query\Parser::JoinAssociationPathExpression PHP Method

JoinAssociationPathExpression() public method

JoinAssociationPathExpression ::= IdentificationVariable "." (CollectionValuedAssociationField | SingleValuedAssociationField)
public JoinAssociationPathExpression ( ) : Doctrine\ORM\Query\AST\JoinAssociationPathExpression
return Doctrine\ORM\Query\AST\JoinAssociationPathExpression
    public function JoinAssociationPathExpression()
    {
        $token = $this->_lexer->lookahead;
        $identVariable = $this->IdentificationVariable();

        $this->match(Lexer::T_DOT);
        $this->match(Lexer::T_IDENTIFIER);

        $field = $this->_lexer->token['value'];

        // Validate association field
        $qComp = $this->_queryComponents[$identVariable];
        $class = $qComp['metadata'];

        if ( ! isset($class->associationMappings[$field])) {
            $this->semanticalError('Class ' . $class->name . ' has no association named ' . $field);
        }

        return new AST\JoinAssociationPathExpression($identVariable, $field);
    }
Parser