. */ /** * ExistsExpression = "EXISTS" "(" Subselect ")" * * @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 2.0 * @version $Revision$ */ class Doctrine_Query_Production_ExistsExpression extends Doctrine_Query_Production { protected $_subselect; public function syntax($paramHolder) { // ExistsExpression = "EXISTS" "(" Subselect ")" $this->_parser->match(Doctrine_Query_Token::T_EXISTS); $this->_parser->match('('); $this->_subselect = $this->AST('Subselect', $paramHolder); $this->_parser->match(')'); } public function buildSql() { return 'EXISTS (' . $this->_subselect->buildSql() . ')'; } /* Getters */ public function getSubselect() { return $this->_subselect; } }