public function history($status, JobInterface $job, $message = null)
    {
        $history = $this->createHistoryRowObject();
        if (!$history instanceof HistoryInterface) {
            throw new \InvalidArgumentException(sprintf('History must be an instance of "Extlib\Cron\Adapter\Job\HistoryInterface", "%s" given.', get_class($history)));
        }

        if (!in_array($status, array(HistoryInterface::STATUS_OK, HistoryInterface::STATUS_WARNING, HistoryInterface::STATUS_ERROR))) {
            throw new \InvalidArgumentException(sprintf('Unknown status - "%s".', $status));
        }

        $history->setJob($job);
        $history->setStatus($status);
        $history->setRunDate($this->date);

        if (null !== $message) {
            $history->setMessage($message);
        }

        $history->save();
        return $this;
    }
public function history($status, JobInterface $job, $message = null)
    {
        $history = $this->createHistoryRowObject();
        if (!$history instanceof HistoryInterface) {
            throw new \InvalidArgumentException(sprintf('History must be an instance of "Extlib\Cron\Adapter\Job\HistoryInterface", "%s" given.', get_class($history)));
        }

        if (!in_array($status, array(HistoryInterface::STATUS_OK, HistoryInterface::STATUS_WARNING, HistoryInterface::STATUS_ERROR))) {
            throw new \InvalidArgumentException(sprintf('Unknown status - "%s".', $status));
        }

        $history->setJob($job);
        $history->setStatus($status);
        $history->setRunDate($this->date);

        if (null !== $message) {
            $history->setMessage($message);
        }

        $history->save();
        return $this;
    }
public function history ( $ status , JobInterface $ job , $ message = null ) { $ history = $ this -> createHistoryRowObject ( ) ; if ( ! $ history instanceof HistoryInterface ) { throw new \ InvalidArgumentException ( sprintf ( 'History must be an instance of "Extlib\Cron\Adapter\Job\HistoryInterface", "%s" given.' , get_class ( $ history ) ) ) ; } if ( ! in_array ( $ status , array ( HistoryInterface :: STATUS_OK , HistoryInterface :: STATUS_WARNING , HistoryInterface :: STATUS_ERROR ) ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Unknown status - "%s".' , $ status ) ) ; } $ history -> setJob ( $ job ) ; $ history -> setStatus ( $ status ) ; $ history -> setRunDate ( $ this -> date ) ; if ( null !== $ message ) { $ history -> setMessage ( $ message ) ; } $ history -> save ( ) ; return $ this ; }
Implementacja metody tworzacej wpis historii zadania

@param int $status
@param \Extlib\Cron\Adapter\Job\JobInterface $job
@param string $message
@return \Extlib\Cron\Adapter\ZendDb
Implementacja metody tworzacej wpis historii zadania