didou Thu Jan 15 07:43:25 2004 EDT
Modified files:
/phpdoc/en/reference/stream/functions stream-filter-register.xml
stream-wrapper-register.xml
Log:
CS : Function declarations follow the 'one true brace' convention
Index: phpdoc/en/reference/stream/functions/stream-filter-register.xml
diff -u phpdoc/en/reference/stream/functions/stream-filter-register.xml:1.5
phpdoc/en/reference/stream/functions/stream-filter-register.xml:1.6
--- phpdoc/en/reference/stream/functions/stream-filter-register.xml:1.5 Mon Dec 15
11:53:49 2003
+++ phpdoc/en/reference/stream/functions/stream-filter-register.xml Thu Jan 15
07:43:25 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<refentry id="function.stream-filter-register">
<refnamediv>
<refname>stream_filter_register</refname>
@@ -160,7 +160,8 @@
/* Define our filter class */
class strtoupper_filter extends php_user_filter {
- function filter($in, $out, &$consumed, $closing) {
+ function filter($in, $out, &$consumed, $closing)
+ {
while ($bucket = stream_bucket_make_writeable($in)) {
$bucket->data = strtoupper($bucket->data);
$consumed += $bucket->datalen;
@@ -215,7 +216,8 @@
class string_filter extends php_user_filter {
var $mode;
- function filter($in, $out, &$consumed, $closing) {
+ function filter($in, $out, &$consumed, $closing)
+ {
while ($bucket = stream_bucket_make_writeable($in)) {
if ($this->mode == 1) {
$bucket->data = strtoupper($bucket->data);
@@ -229,7 +231,8 @@
return PSFS_PASS_ON;
}
- function oncreate() {
+ function oncreate()
+ {
if ($this->filtername == 'str.toupper') {
$this->mode = 1;
} elseif ($this->filtername == 'str.tolower') {
Index: phpdoc/en/reference/stream/functions/stream-wrapper-register.xml
diff -u phpdoc/en/reference/stream/functions/stream-wrapper-register.xml:1.9
phpdoc/en/reference/stream/functions/stream-wrapper-register.xml:1.10
--- phpdoc/en/reference/stream/functions/stream-wrapper-register.xml:1.9 Mon
Dec 15 11:53:49 2003
+++ phpdoc/en/reference/stream/functions/stream-wrapper-register.xml Thu Jan 15
07:43:25 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.9 $ -->
+<!-- $Revision: 1.10 $ -->
<refentry id="function.stream-wrapper-register">
<refnamediv>
<refname>stream_wrapper_register</refname>
@@ -404,7 +404,8 @@
var $position;
var $varname;
- function stream_open($path, $mode, $options, &$opened_path) {
+ function stream_open($path, $mode, $options, &$opened_path)
+ {
$url = parse_url($path);
$this->varname = $url["host"];
$this->position = 0;
@@ -412,13 +413,15 @@
return true;
}
- function stream_read($count) {
+ function stream_read($count)
+ {
$ret = substr($GLOBALS[$this->varname], $this->position, $count);
$this->position += strlen($ret);
return $ret;
}
- function stream_write($data) {
+ function stream_write($data)
+ {
$left = substr($GLOBALS[$this->varname], 0, $this->position);
$right = substr($GLOBALS[$this->varname], $this->position + strlen($data));
$GLOBALS[$this->varname] = $left . $data . $right;
@@ -426,15 +429,18 @@
return strlen($data);
}
- function stream_tell() {
+ function stream_tell()
+ {
return $this->position;
}
- function stream_eof() {
+ function stream_eof()
+ {
return $this->position >= strlen($GLOBALS[$this->varname]);
}
- function stream_seek($offset, $whence) {
+ function stream_seek($offset, $whence)
+ {
switch ($whence) {
case SEEK_SET:
if ($offset < strlen($GLOBALS[$this->varname]) && $offset >= 0) {