Cronario\AbstractJob::getAuthor PHP Method

getAuthor() public method

public getAuthor ( ) : mixed
return mixed
    public function getAuthor()
    {
        return $this->getData(self::P_AUTHOR);
    }

Usage Example

Esempio n. 1
0
 /**
  * @param AbstractJob $parentJob
  *
  * @return ResultException|null
  */
 public function __invoke(AbstractJob $parentJob = null)
 {
     if (null !== $parentJob) {
         $this->setParentId($parentJob->getId())->setAuthor($parentJob->getAuthor());
     }
     $this->save();
     try {
         if ($this->isSync()) {
             $worker = AbstractWorker::factory($this->getWorkerClass());
             $worker($this);
         } else {
             $this->setResult(new ResultException(ResultException::R_QUEUED));
             $this->putIntoQueue();
             $this->save();
         }
     } catch (\Exception $ex) {
         $this->setResult($ex);
         $this->save();
     }
     return $this->getResult();
 }