コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function persist(TaskInterface $task)
 {
     $entity = $this->taskRepository->findByUuid($task->getUuid());
     $this->setTask($entity, $task);
     $this->entityManager->persist($entity);
     $this->entityManager->flush();
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function findByTask(TaskInterface $task)
 {
     return $this->findByTaskUuid($task->getUuid());
 }
コード例 #3
0
ファイル: TaskBuilder.php プロジェクト: php-task/php-task
 /**
  * {@inheritdoc}
  */
 public function executeAt(\DateTime $executionDate)
 {
     $this->task->setFirstExecution($executionDate);
     return $this;
 }
コード例 #4
0
 /**
  * {@inheritdoc}
  */
 public function setExecutionDate(\DateTime $executionDate)
 {
     $this->task->setExecutionDate($executionDate);
     return $this;
 }
コード例 #5
0
 /**
  * Returns message for "no handler found".
  *
  * @param TaskInterface $task
  *
  * @return string
  */
 private function getNoHandlerFoundMessage(TaskInterface $task)
 {
     return sprintf('No handler found handler for "%s" task.', $task->getTaskName());
 }
コード例 #6
0
 /**
  * {@inheritdoc}
  */
 public function getUuid()
 {
     return $this->task->getUuid();
 }