. */ namespace Doctrine\ORM\Query\Parser; /** * UpdateStatement ::= UpdateClause [WhereClause] * * @author Guilherme Blanco * @author Janne Vanhala * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://www.phpdoctrine.org * @since 2.0 * @version $Revision$ */ class UpdateStatement extends \Doctrine\ORM\Query\ParserRule { public function syntax() { // UpdateStatement ::= UpdateClause [WhereClause] $AST = $this->AST('UpdateStatement'); $AST->setUpdateClause($this->parse('UpdateClause')); if ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_WHERE)) { $AST->setWhereClause($this->parse('WhereClause')); } // Return AST node return $AST; } }