_stringPrimary; } public function getSecondSimpleArithmeticExpression() { return $this->_secondSimpleArithmeticExpression; } public function getFirstSimpleArithmeticExpression() { return $this->_firstSimpleArithmeticExpression; } /** * @override */ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) { //TODO: Use platform to get SQL $sql = 'SUBSTRING(' . $sqlWalker->walkStringPrimary($this->_stringPrimary) . ', ' . $sqlWalker->walkSimpleArithmeticExpression($this->_firstSimpleArithmeticExpression) . ', ' . $sqlWalker->walkSimpleArithmeticExpression($this->_secondSimpleArithmeticExpression) . ')'; return $sql; } /** * @override */ public function parse(\Doctrine\ORM\Query\Parser $parser) { $lexer = $parser->getLexer(); $parser->match($lexer->lookahead['value']); $parser->match('('); $this->_stringPrimary = $parser->StringPrimary(); $parser->match(','); $this->_firstSimpleArithmeticExpression = $parser->SimpleArithmeticExpression(); $parser->match(','); $this->_secondSimpleArithmeticExpression = $parser->SimpleArithmeticExpression(); $parser->match(')'); } }