/** * Resolve the subscriber instance. * * @param mixed $subscriber * @return mixed */ protected function resolveSubscriber($subscriber) { if (is_string($subscriber)) { return $this->container->make($subscriber); } return $subscriber; }
/** * Fire the job. * * @return void */ public function fire() { $payload = unserialize($this->job->getData()); // Once we have the message payload, we can create the given class and fire // it off with the given data. The data is in the messages serialized so // we will unserialize it and pass into the jobs in its original form. $this->instance = $this->container->make($payload['job']); $this->instance->fire($this, $payload['data']); }
/** * Get a callable array for a class based filter. * * @param string $filter * @return array */ protected function getClassBasedFilter($filter) { if (str_contains($filter, '@')) { list($class, $method) = explode('@', $filter); return array($this->container->make($class), $method); } return array($this->container->make($filter), 'filter'); }
/** * Fire the job. * * @return void */ public function fire() { $this->instance = $this->container->make($this->job); $this->instance->fire($this, $this->data); }