/** * Initializes this instance with the specified condition, the specified * strategy or mapping to be resolved when condition is non-null and, * optionally, the specified strategy or mapping to be resolved when * condition is null. * * @param Strategy $condition Condition. * @param Strategy|Mapping|array|mixed $if Primary expression. * @param Strategy|Mapping|array|mixed|null $else Optional. Fallback expression. */ public function __construct(Strategy $condition, $if, $else = null) { parent::__construct($condition); $this->if = $if; $this->else = $else; }
/** * @param Strategy $strategy * @param Strategy|Mapping|array|mixed $expression */ public function __construct(Strategy $strategy, $expression) { parent::__construct($strategy); $this->expression = $expression; }
/** * @param DataType $type Type to cast to. * @param Strategy $strategy Strategy. */ public function __construct(DataType $type, Strategy $strategy) { parent::__construct($strategy); $this->type = $type; }