/** * Notify the Client * * @param int $type one of NOTIFY_* * @param string $data * @return bool */ public function notify($type, $data = null) { if ($type == JobInterface::NOTIFY_COMPLETE) { return $this->job->sendComplete($data); } if ($type == JobInterface::NOTIFY_DATA) { return $this->job->sendData($data); } if ($type == JobInterface::NOTIFY_EXCEPTION) { return $this->job->sendException($data); } if ($type == JobInterface::NOTIFY_FAIL) { return $this->job->sendFail(); } if ($type == JobInterface::NOTIFY_WARNING) { return $this->job->notifyWarning($data); } return false; }