Cronario\AbstractJob::addCallbackJob PHP Method

addCallbackJob() protected method

protected addCallbackJob ( $type, $job )
$type
$job
    protected function addCallbackJob($type, $job)
    {
        if (is_object($job) && $job instanceof self) {
            $this->data[self::P_CALLBACKS][$type][] = serialize($job);
            $this->callbacks[$type][] = $job;
            return $this;
        }
        if (is_string($job)) {
            $this->data[self::P_CALLBACKS][$type][] = $job;
            $this->callbacks[$type][] = unserialize($job);
            return $this;
        }
        throw new JobException('Callback job must be a serialized string OR object!');
    }