[TASK] Introduced addLine() to the buffer class.

[TASK] Made createBuffer function protected in ProtocolHandler classes.
This commit is contained in:
Jan Philipp Timme
2011-06-26 14:03:32 +00:00
parent df030e453d
commit 8e32f35edf
8 changed files with 50 additions and 21 deletions
+10
View File
@@ -59,6 +59,16 @@ class Misc_Buffer {
$this->pruneEmptyLines();
}
/**
* Appends data + linebreak to the buffer.
* @param string $data
* @return void
*/
public function addLine($data) {
$this->buffer .= $data . $this->linebreak;
$this->pruneEmptyLines();
}
/**
* Returns the next line in the buffer and removes it from the buffer.
* @return string