mirror of
https://github.com/macintoshplus/doc-en.git
synced 2026-03-28 10:52:18 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@146336 c90b9560-bf6c-de11-be94-00142212c4b1
210 lines
7.4 KiB
XML
Executable File
210 lines
7.4 KiB
XML
Executable File
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.5 $ -->
|
|
<!-- Author: Wez Furlong <wez@thebrainroom.com>
|
|
Please contact me before making any major amendments to the
|
|
content of this section. Splitting/Merging are fine if they are
|
|
required for php-doc restructuring purposes - just drop me a line
|
|
if you make a change (so I can update my local copy).
|
|
-->
|
|
|
|
<sect1 id="streams.structs">
|
|
<title>Streams Structures</title>
|
|
|
|
<refentry id="streams.struct-php-stream-statbuf">
|
|
<refnamediv>
|
|
<refname>struct php_stream_statbuf</refname>
|
|
<refpurpose>Holds information about a file or URL</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<synopsis>
|
|
<structname>php_stream_statbuf</structname>
|
|
<type>struct stat</type> <structfield>sb</structfield>
|
|
</synopsis>
|
|
<para>
|
|
<structfield>sb</structfield> is a regular, system defined, struct stat.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="streams.struct-php-stream-dirent">
|
|
<refnamediv>
|
|
<refname>struct php_stream_dirent</refname>
|
|
<refpurpose>Holds information about a single file during dir scanning</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<synopsis>
|
|
<structname>php_stream_dirent</structname>
|
|
<type>char</type> <structfield>d_name[MAXPATHLEN]</structfield>
|
|
</synopsis>
|
|
<para>
|
|
<structfield>d_name</structfield> holds the name of the file, relative to the directory
|
|
being scanned.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="streams.struct-php-stream-ops">
|
|
<refnamediv>
|
|
<refname>struct php_stream_ops</refname>
|
|
<refpurpose>Holds member functions for a stream implementation</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<programlisting role="c">
|
|
<![CDATA[
|
|
typedef struct _php_stream_ops {
|
|
/* all streams MUST implement these operations */
|
|
size_t (*write)(php_stream *stream, const char *buf, size_t count TSRMLS_DC);
|
|
size_t (*read)(php_stream *stream, char *buf, size_t count TSRMLS_DC);
|
|
int (*close)(php_stream *stream, int close_handle TSRMLS_DC);
|
|
int (*flush)(php_stream *stream TSRMLS_DC);
|
|
|
|
const char *label; /* name describing this class of stream */
|
|
|
|
/* these operations are optional, and may be set to NULL if the stream does not
|
|
* support a particular operation */
|
|
int (*seek)(php_stream *stream, off_t offset, int whence TSRMLS_DC);
|
|
char *(*gets)(php_stream *stream, char *buf, size_t size TSRMLS_DC);
|
|
int (*cast)(php_stream *stream, int castas, void **ret TSRMLS_DC);
|
|
int (*stat)(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC);
|
|
} php_stream_ops;
|
|
]]>
|
|
</programlisting>
|
|
</refsect1>
|
|
</refentry>
|
|
<refentry id="streams.struct-php-stream-wrapper">
|
|
<refnamediv>
|
|
<refname>struct php_stream_wrapper</refname>
|
|
<refpurpose>Holds wrapper properties and pointer to operations</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<programlisting role="c">
|
|
<![CDATA[
|
|
struct _php_stream_wrapper {
|
|
php_stream_wrapper_ops *wops; /* operations the wrapper can perform */
|
|
void *abstract; /* context for the wrapper */
|
|
int is_url; /* so that PG(allow_url_fopen) can be respected */
|
|
|
|
/* support for wrappers to return (multiple) error messages to the stream opener */
|
|
int err_count;
|
|
char **err_stack;
|
|
} php_stream_wrapper;
|
|
]]>
|
|
</programlisting>
|
|
</refsect1>
|
|
</refentry>
|
|
<refentry id="streams.struct-php-stream-wrapper-ops">
|
|
<refnamediv>
|
|
<refname>struct php_stream_wrapper_ops</refname>
|
|
<refpurpose>Holds member functions for a stream wrapper implementation</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<programlisting role="c">
|
|
<![CDATA[
|
|
typedef struct _php_stream_wrapper_ops {
|
|
/* open/create a wrapped stream */
|
|
php_stream *(*stream_opener)(php_stream_wrapper *wrapper, char *filename, char *mode,
|
|
int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC);
|
|
/* close/destroy a wrapped stream */
|
|
int (*stream_closer)(php_stream_wrapper *wrapper, php_stream *stream TSRMLS_DC);
|
|
/* stat a wrapped stream */
|
|
int (*stream_stat)(php_stream_wrapper *wrapper, php_stream *stream, php_stream_statbuf *ssb TSR$
|
|
/* stat a URL */
|
|
int (*url_stat)(php_stream_wrapper *wrapper, char *url, php_stream_statbuf *ssb TSRMLS_DC);
|
|
/* open a "directory" stream */
|
|
php_stream *(*dir_opener)(php_stream_wrapper *wrapper, char *filename, char *mode,
|
|
int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC);
|
|
|
|
const char *label;
|
|
|
|
/* Delete/Unlink a file */
|
|
int (*unlink)(php_stream_wrapper *wrapper, char *url, int options, php_stream_context *context TSRMLS_DC);
|
|
} php_stream_wrapper_ops;
|
|
]]>
|
|
</programlisting>
|
|
</refsect1>
|
|
</refentry>
|
|
<refentry id="streams.struct-php-stream-filter">
|
|
<refnamediv>
|
|
<refname>struct php_stream_filter</refname>
|
|
<refpurpose>Holds filter properties and pointer to operations</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<programlisting role="c">
|
|
<![CDATA[
|
|
struct _php_stream_filter {
|
|
php_stream_filter_ops *fops;
|
|
void *abstract; /* for use by filter implementation */
|
|
php_stream_filter *next;
|
|
php_stream_filter *prev;
|
|
int is_persistent;
|
|
|
|
/* link into stream and chain */
|
|
php_stream_filter_chain *chain;
|
|
|
|
/* buffered buckets */
|
|
php_stream_bucket_brigade buffer;
|
|
} php_stream_filter;
|
|
]]>
|
|
</programlisting>
|
|
</refsect1>
|
|
</refentry>
|
|
<refentry id="streams.struct-php-stream-filter-ops">
|
|
<refnamediv>
|
|
<refname>struct php_stream_filter_ops</refname>
|
|
<refpurpose>Holds member functions for a stream filter implementation</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<programlisting role="c">
|
|
<![CDATA[
|
|
typedef struct _php_stream_filter_ops {
|
|
php_stream_filter_status_t (*filter)(
|
|
php_stream *stream,
|
|
php_stream_filter *thisfilter,
|
|
php_stream_bucket_brigade *buckets_in,
|
|
php_stream_bucket_brigade *buckets_out,
|
|
size_t *bytes_consumed,
|
|
int flags
|
|
TSRMLS_DC);
|
|
|
|
void (*dtor)(php_stream_filter *thisfilter TSRMLS_DC);
|
|
|
|
const char *label;
|
|
} php_stream_filter_ops;
|
|
]]>
|
|
</programlisting>
|
|
</refsect1>
|
|
</refentry>
|
|
</sect1>
|
|
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|
|
|