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