. */ /** * DeleteClause = "DELETE" ["FROM"] VariableDeclaration * * @package Doctrine * @subpackage Query * @author Guilherme Blanco * @author Janne Vanhala * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://www.phpdoctrine.org * @since 1.0 * @version $Revision$ */ class Doctrine_Query_Production_DeleteClause extends Doctrine_Query_Production { protected $_variableDeclaration; public function syntax($paramHolder) { // DeleteClause = "DELETE" ["FROM"] VariableDeclaration $this->_parser->match(Doctrine_Query_Token::T_DELETE); if ($this->_isNextToken(Doctrine_Query_Token::T_FROM)) { $this->_parser->match(Doctrine_Query_Token::T_FROM); } $this->_variableDeclaration = $this->AST('VariableDeclaration', $paramHolder); } public function buildSql() { return 'DELETE FROM ' . $this->_variableDeclaration->buildSql(); } }