示例#1
0
 /**
  * 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;
 }
示例#2
0
 /**
  * @param Strategy $strategy
  * @param Strategy|Mapping|array|mixed $expression
  */
 public function __construct(Strategy $strategy, $expression)
 {
     parent::__construct($strategy);
     $this->expression = $expression;
 }
示例#3
0
 /**
  * @param DataType $type Type to cast to.
  * @param Strategy $strategy Strategy.
  */
 public function __construct(DataType $type, Strategy $strategy)
 {
     parent::__construct($strategy);
     $this->type = $type;
 }