_job = $job; $this->_priority = $priority; } /* (non-phpdoc) * @see Command::getCommandLine() */ public function getCommandLine() { return sprintf( 'bury %u %u', $this->_job->getId(), $this->_priority ); } /* (non-phpdoc) * @see ResponseParser::parseResponse() */ public function parseResponse($responseLine, $responseData) { if ($responseLine == Response::RESPONSE_NOT_FOUND) { throw new Exception\ServerException(sprintf( '%s: Job %u is not reserved or does not exist.', $responseLine, $this->_job->getId() )); } elseif ($responseLine == Response::RESPONSE_BURIED) { return $this->_createResponse(Response::RESPONSE_BURIED); } else { throw new Exception('Unhandled response: '.$responseLine); } } }