Example #1
0
 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'];
 }
Example #2
0
 /**
  * @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);
 }