. */ namespace Doctrine\ORM\Query\AST; /** * GeneralCaseExpression ::= "CASE" WhenClause {WhenClause}* "ELSE" ScalarExpression "END" * * @since 2.2 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @author Benjamin Eberlei * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel */ class GeneralCaseExpression extends Node { public $whenClauses = array(); public $elseScalarExpression = null; public function __construct(array $whenClauses, $elseScalarExpression) { $this->whenClauses = $whenClauses; $this->elseScalarExpression = $elseScalarExpression; } public function dispatch($sqlWalker) { return $sqlWalker->walkGeneralCaseExpression($this); } }