public function __construct(array $data) { parent::__construct($data); if ($data['schedule'] instanceof Query) { $this->setSchedule($data['schedule']); } if (is_callable($data['callback'])) { $this->setCallback($data['callback']); } }
/** * * @param Store $data */ public function __construct($data = []) { $data[Store::PRIORITY] = isset($data[Store::PRIORITY]) ? $data[Store::PRIORITY] : self::NORM; parent::__construct($data); }
/** * * @param Store $store * @throws QueueException */ public function __construct($data = []) { parent::__construct($data); $this->data[Store::NAME] = isset($this->data[Store::NAME]) ? $this->data[Store::NAME] : $this->makeName(); }