public static function unserialize($serializedResult) { $unserialized = unserialize($serializedResult); $unserialized['result']->setTask(TaskFormatter::unserialize($unserialized['serializedTask'])); $unserialized['result']->setFork(ForkFormatter::unserialize($unserialized['serializedFork'])); return $unserialized['result']; }
/** * @return \Ackintosh\Snidel\Task * @throws \RuntimeException */ public function dequeue() { $this->dequeuedCount++; try { $serializedTask = $this->receiveMessage(); } catch (\RuntimeException $e) { throw new \RuntimeException('failed to dequeue task'); } return Formatter::unserialize($serializedTask); }