createBuffers(); } /** * Returns whether work() can be called or not. * Depends on the protocol and its implementation. * @return boolean */ abstract public function canWork(); /** * Main worker function of the ProtocolHandler. * Will fetch data from the buffer_incoming, process it, * and create a ProtocolContentObject out of it that will be returned to the client. * @return mixed instance of Protocol_AbstractProtocolContentObject */ abstract public function work(); /** * Adds the incoming data to the internal buffer. * @param string $rawData */ public function pushRawData($rawData) { $this->buffer_incoming->addData($rawData); } /** * Returns all outgoing data of the internal buffer. * @return string */ public function getRawData() { return $this->buffer_outgoing->getAllBufferContents(); } } ?>