. */ /** * QueryLanguage = SelectStatement | UpdateStatement | DeleteStatement * * @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_QueryLanguage extends Doctrine_Query_Production { public function syntax($paramHolder) { // QueryLanguage = SelectStatement | UpdateStatement | DeleteStatement switch ($this->_parser->lookahead['type']) { case Doctrine_Query_Token::T_SELECT: return $this->AST('SelectStatement', $paramHolder); break; case Doctrine_Query_Token::T_UPDATE: return $this->AST('UpdateStatement', $paramHolder); break; case Doctrine_Query_Token::T_DELETE: return $this->AST('DeleteStatement', $paramHolder); break; default: $this->_parser->syntaxError('SELECT, UPDATE or DELETE'); break; } } }