Document additional userspace wrapper methods and cleanup some protos.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@132840 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Sara Golemon 2003-06-22 03:38:08 +00:00
parent 405647fad1
commit 5aed140af1

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<refentry id="function.stream-wrapper-register">
<refnamediv>
<refname>stream_wrapper_register</refname>
@ -106,7 +106,7 @@
<methodsynopsis>
<type>void</type><methodname>stream_close</methodname>
<methodparam><type>void</type><parameter></parameter></methodparam>
<void/>
</methodsynopsis>
<para>
This method is called when the stream is closed, using
@ -148,7 +148,7 @@
<methodsynopsis>
<type>bool</type><methodname>stream_eof</methodname>
<methodparam><type>void</type><parameter></parameter></methodparam>
<void/>
</methodsynopsis>
<para>
This method is called in response to <function>feof</function>
@ -159,7 +159,7 @@
<methodsynopsis>
<type>int</type><methodname>stream_tell</methodname>
<methodparam><type>void</type><parameter></parameter></methodparam>
<void/>
</methodsynopsis>
<para>
This method is called in response to <function>ftell</function>
@ -183,7 +183,7 @@
<methodsynopsis>
<type>bool</type><methodname>stream_flush</methodname>
<methodparam><type>void</type><parameter></parameter></methodparam>
<void/>
</methodsynopsis>
<para>
This method is called in response to <function>fflush</function>
@ -195,6 +195,98 @@
not be stored.
</para>
<methodsynopsis>
<type>array</type><methodname>stream_stat</methodname>
<void/>
</methodsynopsis>
<para>
This method is called in response to <function>fstat</function>
calls on the stream and should return an array containing the same
values as appropriate for the stream.
</para>
<methodsynopsis>
<type>bool</type><methodname>unlink</methodname>
<methodparam><type>string</type><parameter>path</parameter></methodparam>
</methodsynopsis>
<para>
This method is called in response to <function>unlink</function>
calls on URL paths associated with the wrapper and should attempt
to delete the item specified by <parameter>path</parameter>.
It should return &true; on success or &false; on failure.
In order for the appropriate error message to be returned,
do not define this method if your wrapper does not support unlinking.
</para>
<note>
<simpara>
Userspace wrapper unlink method is not supported prior to
<literal>PHP 5.0.0</literal>.
</simpara>
</note>
<!--
Note: url_stat() is not yet implemented.
ext/standard/filestat.c needs to route through wrappers first.
<methodsynopsis>
<type>array</type><methodname>url_stat</methodname>
<methodparam><type>string</type><parameter>path</parameter></methodparam>
</methodsynopsis>
<para>
This method is called in response to <function>stat</function>
calls on the URL paths associated with the wrapper and should
return as many elements in common with the system function as
possible. Unknown or unavailable values should be set to a
rational value (usually <constant>0</constant>).
</para>
-->
<methodsynopsis>
<type>bool</type><methodname>dir_opendir</methodname>
<methodparam><type>string</type><parameter>path</parameter></methodparam>
<methodparam><type>int</type><parameter>options</parameter></methodparam>
</methodsynopsis>
<para>
This method is called immediately when your stream object is created for
examining directory contents with <function>opendir</function>.
<parameter>path</parameter> specifies the URL that was
passed to <function>opendir</function> and that this object is
expected to explore. You can use <function>parse_url</function>
to break it apart.
</para>
<methodsynopsis>
<type>string</type><methodname>dir_readdir</methodname>
<void/>
</methodsynopsis>
<para>
This method is called in response to <function>readdir</function>
and should return a string representing the next filename in the
location opened by <function>dir_opendir</function>.
</para>
<methodsynopsis>
<type>bool</type><methodname>dir_rewinddir</methodname>
<void/>
</methodsynopsis>
<para>
This method is called in response to <function>rewinddir</function>
and should reset the output generated by <function>dir_readdir</function>.
i.e.: The next call to <function>dir_readdir</function> should return
the first entry in the location returned by <function>dir_opendir</function>.
</para>
<methodsynopsis>
<type>bool</type><methodname>dir_closedir</methodname>
<void/>
</methodsynopsis>
<para>
This method is called in response to <function>closedir</function>.
You should release any resources which were locked or allocated during
the opening and use of the directory stream.
</para>
<para>
The example below implements a var:// protocol handler that
allows read/write access to a named global variable using