/** * Pop the next job off of the queue. * * @param string $queue * @return \Illuminate\Contracts\Queue\Job|null */ public function pop($queue = null) { $queue = $this->getQueue($queue); $job = $this->iron->getMessage($queue); // If we were able to pop a message off of the queue, we will need to decrypt // the message body, as all Iron.io messages are encrypted, since the push // queues will be a security hazard to unsuspecting developers using it. if (!is_null($job)) { $job->body = $this->parseJobBody($job->body); return new IronJob($this->container, $this, $job); } }