X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fvarstream.php;h=e57b60fd82045640c67af25314b05eaa0afc2877;hb=77af6562b4110b87bf2354f22db42040b1cfaa1b;hp=2d730b5bf2598d0b23d50c450f73738d624d7292;hpb=a7de4ef724d1a3b0bf978a50ce7cc9d23412c7a0;p=platal.git diff --git a/classes/varstream.php b/classes/varstream.php index 2d730b5..e57b60f 100644 --- a/classes/varstream.php +++ b/classes/varstream.php @@ -1,6 +1,6 @@ varname = $url['host']; @@ -38,18 +38,18 @@ class VarStream return true; } - function stream_close() + public function stream_close() { } - function stream_read($count) + public function stream_read($count) { $ret = substr($GLOBALS[$this->varname], $this->position, $count); $this->position += strlen($ret); return $ret; } - function stream_write($data) + public function stream_write($data) { $len = strlen($data); if ($len > $this->position + strlen($GLOBALS[$this->varname])) { @@ -60,17 +60,17 @@ class VarStream $this->position += $len; } - function stream_eof() + public function stream_eof() { return $this->position >= strlen($GLOBALS[$this->varname]); } - function stream_tell() + public function stream_tell() { return $this->position; } - function stream_seek($offs, $whence) + public function stream_seek($offs, $whence) { switch ($whence) { case SEEK_SET: @@ -93,11 +93,11 @@ class VarStream return 0; } - function stream_flush() + public function stream_flush() { } - static function init() + static public function init() { stream_wrapper_register('var','VarStream'); }