projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes vim mode line.
[platal.git]
/
classes
/
varstream.php
diff --git
a/classes/varstream.php
b/classes/varstream.php
index
bc7f606
..
ef1b3e3
100644
(file)
--- a/
classes/varstream.php
+++ b/
classes/varstream.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-20
07
Polytechnique.org *
+ * Copyright (C) 2003-20
11
Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-25,7
+25,7
@@
class VarStream
private $varname;
private $position;
private $varname;
private $position;
- function stream_open($path, $mode, $options, &$opened_path)
+
public
function stream_open($path, $mode, $options, &$opened_path)
{
$url = parse_url($path);
$this->varname = $url['host'];
{
$url = parse_url($path);
$this->varname = $url['host'];
@@
-38,18
+38,18
@@
class VarStream
return true;
}
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;
}
{
$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])) {
{
$len = strlen($data);
if ($len > $this->position + strlen($GLOBALS[$this->varname])) {
@@
-60,17
+60,17
@@
class VarStream
$this->position += $len;
}
$this->position += $len;
}
- function stream_eof()
+
public
function stream_eof()
{
return $this->position >= strlen($GLOBALS[$this->varname]);
}
{
return $this->position >= strlen($GLOBALS[$this->varname]);
}
- function stream_tell()
+
public
function stream_tell()
{
return $this->position;
}
{
return $this->position;
}
- function stream_seek($offs, $whence)
+
public
function stream_seek($offs, $whence)
{
switch ($whence) {
case SEEK_SET:
{
switch ($whence) {
case SEEK_SET:
@@
-93,14
+93,15
@@
class VarStream
return 0;
}
return 0;
}
- function stream_flush()
+
public
function stream_flush()
{
}
{
}
- static function init()
+ static
public
function init()
{
stream_wrapper_register('var','VarStream');
}
}
{
stream_wrapper_register('var','VarStream');
}
}
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8:
?>
?>