. */ namespace Doctrine\ORM\Query\AST; /** * SimpleCaseExpression ::= "CASE" CaseOperand SimpleWhenClause {SimpleWhenClause}* "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 SimpleCaseExpression extends Node { public $caseOperand = null; public $simpleWhenClauses = array(); public $elseScalarExpression = null; public function __construct($caseOperand, array $simpleWhenClauses, $elseScalarExpression) { $this->caseOperand = $caseOperand; $this->simpleWhenClauses = $simpleWhenClauses; $this->elseScalarExpression = $elseScalarExpression; } public function dispatch($sqlWalker) { return $sqlWalker->walkSimpleCaseExpression($this); } }