cvs: phpdoc /en/reference/stream/functions stream-wrapper-register.xml
| From: | Arnaud Le Blanc | Date: | Sat, 15 Nov 2008 13:45:31 +0000 |
| Subject: | cvs: phpdoc /en/reference/stream/functions stream-wrapper-register.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-2551@lists.php.net to get a copy of this message | ||
lbarnaud Sat Nov 15 13:45:31 2008 UTC
Modified files:
/phpdoc/en/reference/stream/functions stream-wrapper-register.xml
Log:
Documented new user-space stream wrapper methods
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/stream/functions/stream-wrapper-register.xml?r1=1.15&r2=1.16&diff_format=u
Index: phpdoc/en/reference/stream/functions/stream-wrapper-register.xml
diff -u phpdoc/en/reference/stream/functions/stream-wrapper-register.xml:1.15
phpdoc/en/reference/stream/functions/stream-wrapper-register.xml:1.16
--- phpdoc/en/reference/stream/functions/stream-wrapper-register.xml:1.15 Sun Dec 30 00:26:59 2007
+++ phpdoc/en/reference/stream/functions/stream-wrapper-register.xml Sat Nov 15 13:45:31 2008
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.15 $ -->
+<!-- $Revision: 1.16 $ -->
<refentry xml:id="function.stream-wrapper-register" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>stream_wrapper_register</refname>
@@ -204,6 +204,64 @@
calls on the stream and should return an array containing the same
values as appropriate for the stream.
</para>
+
+ <methodsynopsis>
+ <type>resource</type><methodname>stream_cast</methodname>
+
<methodparam><type>int</type><parameter>cast_as</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ This method is called in response to <function>stream_select</function>
+ calls on the stream and should return the underlying stream resource used
+ by the wrapper, or &false;. The
+ <parameter>cast_as</parameter> parameter can be
+ <constant>STREAM_CAST_FOR_SELECT</constant> when
+ <function>stream_select</function> is calling
+ <function>stream_cast</function> or
+ <constant>STREAM_CAST_AS_STREAM</constant> when
+ <function>stream_cast</function> is called for other uses.
+ </para>
+ <note>
+ <simpara>
+ Userspace wrapper stream_cast method is not supported prior to
+ PHP 5.3.0.
+ </simpara>
+ </note>
+
+ <methodsynopsis>
+ <type>bool</type><methodname>stream_set_option</methodname>
+
<methodparam><type>int</type><parameter>option</parameter></methodparam>
+
<methodparam><type>int</type><parameter>arg1</parameter></methodparam>
+
<methodparam><type>int</type><parameter>arg2</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ This method is called to set options on the stream. Possible values
+ for <parameter>option</parameter> are:
+ <simplelist>
+ <member><constant>STREAM_OPTION_BLOCKING</constant>: The method is called
+ in response to <function>stream_set_blocking</function>.
+ <parameter>arg1</parameter> is the requested blocking mode.</member>
+ <member><constant>STREAM_OPTION_READ_TIMEOUT</constant>: The method is
+ called in response to <function>stream_set_timeout</function>.
+ <parameter>arg1</parameter> is the timeout in seconds, and
+ <parameter>arg2</parameter> is the timeout in microseconds.</member>
+ <member><constant>STREAM_OPTION_WRITE_BUFFER</constant>: The method is
+ called in response to <function>stream_set_write_buffer</function>.
+ <parameter>arg1</parameter> is the buffer mode
+ (<constant>STREAM_BUFFER_NONE</constant> or
+ <constant>STREAM_BUFFER_FULL</constant>) and
<parameter>arg2</parameter>
+ is the requested buffer size.</member>
+ </simplelist>
+ </para>
+ <para>
+ <function>stream_set_option</function> should return &false; on failure or
+ if the <parameter>option</parameter> is not implemented, &true; otherwise.
+ </para>
+ <note>
+ <simpara>
+ Userspace wrapper stream_set_option method is not supported prior to
+ PHP 5.3.0.
+ </simpara>
+ </note>
<methodsynopsis>
<type>bool</type><methodname>unlink</methodname>
@@ -500,6 +558,38 @@
</para>
</refsect1>
+
+ <refsect1 role="changelog"><!-- {{{ -->
+ &reftitle.changelog;
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>5.0.0</entry>
+ <entry>
+ Added <function>unlink</function>, <function>rename</function>,
+ <function>mkdir</function> and <function>rmdir</function> methods.
+ </entry>
+ </row>
+ <row>
+ <entry>5.3.0</entry>
+ <entry>
+ Added <function>stream_cast</function> and
<function>stream_set_option</function> methods.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1><!-- }}} -->
+
</refentry>