/** * @param Strategy|Mapping|array|mixed $expression Expression. * @param callable|null $callback Callback function that receives the current value as its first argument. */ public function __construct($expression, callable $callback = null) { parent::__construct($expression); $this->callback = $callback; }
/** * @param Strategy|Mapping|array|mixed $collection Expression that maps to an array. * @param int $depth Number of times to descending into nested collections. */ public function __construct($collection, $depth = 1) { parent::__construct($collection); $this->depth = max(1, $depth | 0); }
/** * @param Strategy|Mapping|array|mixed $first First data set. * @param Strategy|Mapping|array|mixed $second Second data set. */ public function __construct($first, $second) { parent::__construct($first); $this->second = $second; }
/** * @param Strategy|Mapping|array|mixed $expression Expression. * @param Strategy|Mapping|array|mixed $context New context. */ public function __construct($expression, $context) { parent::__construct($expression); $this->expression = $context; }
/** * Initializes this instance with the specified strategy or mapping that yields a data collection and the specified * strategy or mapping that describes how to transform each datum in the collection. * * @param Strategy|Mapping|array|mixed $collection Data collection expression that maps to an array * @param Strategy|Mapping|array|mixed $transformation Transformation expression. * The current datum is passed as context. */ public function __construct($collection, $transformation) { parent::__construct($collection); $this->transformation = $transformation; }