X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fvarstream.php;h=7816c5f676b6146a7e235fd0c1f0e56c958fa95e;hb=0e2472b60dac42b4891ee3673e2e6770ca76e04c;hp=744ca346eec5adf57e8a6a6858228517f685bb4c;hpb=c83168b1f1bf43e24bcf3a5f3fe272d10198ea2a;p=platal.git diff --git a/classes/varstream.php b/classes/varstream.php index 744ca34..7816c5f 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,14 +93,15 @@ class VarStream return 0; } - function stream_flush() + public function stream_flush() { } - static function init() + static public function init() { stream_wrapper_register('var','VarStream'); } } +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>