/**
  * run the work
  *
  * @param \Serializable $input the data, that the worker should process
  * @return \Serializable Returns the result
  * @throws \Exception in case of a processing Error an Exception will be thrown
  */
 public function run($input)
 {
     if (!$input instanceof SerializableWorkerClosure) {
         throw new DomainException('No SerializableClosureWorker was specified');
     }
     $c = $input->getSerializableClosure();
     return $c($input->getInput(), $this->semaphore, $this->storage);
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function unserialize($data)
 {
     return Serializable::unserialize($data);
 }