/** * Constructor. * * Accepting an array of contexts, sets the keys of the source attributes to * the FQCN of each context class and the value to the contexts themselves. * * @param array $contexts */ public function __construct(array $contexts) { $this->verifyContexts($contexts); $contexts = array_combine(array_map(function ($c) { return get_class($c); }, $contexts), $contexts); parent::__construct($contexts); }
public function __construct($firstName, $lastName) { $this->firstName = $firstName; $this->lastName = $lastName; parent::__construct(['called' => false]); }
public function __construct($make, $model, array $attributes) { $this->make = $make; $this->model = $model; parent::__construct($attributes); }
public function __construct($make, $model) { $this->make = $make; $this->model = $model; parent::__construct(['called' => false]); }