/**
  * {@inheritdoc}
  */
 function __construct($object)
 {
     parent::__construct($object);
     $this->task = new Task($this->task);
     if ($this->workflow) {
         $this->workflow = new Workflow($this->workflow);
     }
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function __construct($object)
 {
     parent::__construct($object);
     if ($this->workflow) {
         $this->workflow = Workflow($this->workflow);
     }
     $taskFactory = function ($task) {
         return new Task($task);
     };
     $this->completedTasks = array_map($taskFactory, $this->completedTasks);
     $this->failedTasks = array_map($taskFactory, $this->failedTasks);
 }
예제 #3
0
 /**
  * {@inheritdoc}
  */
 public function __construct($object)
 {
     $result = $object->result;
     unset($object->result);
     parent::__construct($object);
     if ($this->fsm) {
         $this->fsm = new Fsm($this->fsm);
     }
     if ($this->celery) {
         $this->celery = new Celery($this->celery);
     }
     if (self::STATE_FAILED == $this->state) {
         $this->exception = new ServerException($result);
     } else {
         $this->result = $result;
     }
 }