/** * * @param array $options */ public function __construct($options = []) { // load up the format at creation time if (isset($options['format'])) { $this->format = $options['format']; } parent::__construct($options); }
/** * * * @param array $options */ public function __construct($options) { Ch::ek($options, $this->requiredFields); $this->serializer = $options['serializer']; $this->callback = $options['callback']; // make sure that the serializer is set up properly if (!$this->serializer instanceof \Solvire\API\Serializers\BaseSerializer) { throw new \RuntimeException("Your serializer must be of type Solvire\\API\\Serializers\\BaseSerializer on " . $this->name); } parent::__construct($options); }
/** * * @param array $options */ public function __construct($options = []) { // load up the format at creation time if (isset($options['maleValue'])) { $this->maleValue = $options['maleValue']; } if (isset($options['femaleValue'])) { $this->femaleValue = $options['femaleValue']; } parent::__construct($options); }
/** * * * @param array $options */ public function __construct($options) { Ch::ek($options, $this->requiredFields); $this->transformer = $options['transformer']; $this->callback = $options['callback']; // make sure that the transformer is set up properly if (!$this->transformer instanceof \League\Fractal\TransformerAbstract) { throw new \RuntimeException("Your transformer must be of type League\\Fractal\\TransformerAbstract on " . $this->name); } if (!method_exists($this->transformer, 'transform')) { throw new \RuntimeException("Your transformer must implement the transform function "); } parent::__construct($options); }
public function __construct($options) { parent::__construct($options); }
public function addField($name, DataField $field) { $field->setName($name); $this->dataFields->set($name, $field); return $this; }