Exemplo n.º 1
0
 /**
  * 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);
 }
Exemplo n.º 2
0
 public function __construct($firstName, $lastName)
 {
     $this->firstName = $firstName;
     $this->lastName = $lastName;
     parent::__construct(['called' => false]);
 }
Exemplo n.º 3
0
 public function __construct($make, $model, array $attributes)
 {
     $this->make = $make;
     $this->model = $model;
     parent::__construct($attributes);
 }
Exemplo n.º 4
0
 public function __construct($make, $model)
 {
     $this->make = $make;
     $this->model = $model;
     parent::__construct(['called' => false]);
 }