[TASK] Removed the linebreak from the buffers in the ConnectionHandler.

[TASK] Added a WrongDatatypeException
[TASK] Started to implement the ProtocolHandler in a different way.
[TASK] Started to put buffers into the ProtocolHandler.
[!!!] Committing broken code.
This commit is contained in:
Jan Philipp Timme
2010-11-30 23:25:15 +00:00
parent 5cb0714834
commit c382cfe756
5 changed files with 51 additions and 14 deletions
+19
View File
@@ -94,5 +94,24 @@ class Misc_Buffer {
return (trim(strstr($this->buffer, $this->linebreak, TRUE)) !== "") ? TRUE : FALSE;
}
/**
* Returns TRUE when there is data in the buffer.
* @return boolean
*/
public function hasData() {
return (strlen($this->buffer) > 0) ? TRUE : FALSE;
}
/**
* Returns the full buffer contents.
* Also truncates the buffer.
* @return string
*/
public function getAllBufferContents() {
$return = $this->buffer;
$this->buffer = "";
return $return;
}
}
?>