. */ namespace Doctrine\ORM\Query\AST\Functions; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\SqlWalker; use Doctrine\ORM\Query\AST\AggregateExpression; /** * "COUNT" "(" ["DISTINCT"] StringPrimary ")" * * @link www.doctrine-project.org * @since 2.0 * @author Mathew Davies */ class CountFunction extends FunctionNode { /** * @var AggregateExpression */ public $aggregateExpression; /** * @inheritDoc */ public function getSql(SqlWalker $sqlWalker) { return $this->aggregateExpression->dispatch($sqlWalker); } /** * @inheritDoc */ public function parse(Parser $parser) { $this->aggregateExpression = $parser->AggregateExpression(); } }