svn: /phpdoc/en/trunk/reference/spl/ book.xml spltempfileobject/construct.xml spltempfileobject.xml
| From: | Peter Cowburn | Date: | Mon, 10 Aug 2009 20:40:34 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/spl/ book.xml spltempfileobject/construct.xml spltempfileobject.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-4641@lists.php.net to get a copy of this message | ||
salathe Mon, 10 Aug 2009 20:40:34 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=287057
Log:
Added SplTempFileObject documentation
Changed paths:
U phpdoc/en/trunk/reference/spl/book.xml
A phpdoc/en/trunk/reference/spl/spltempfileobject/
A phpdoc/en/trunk/reference/spl/spltempfileobject/construct.xml
A phpdoc/en/trunk/reference/spl/spltempfileobject.xml
Modified: phpdoc/en/trunk/reference/spl/book.xml
===================================================================
--- phpdoc/en/trunk/reference/spl/book.xml 2009-08-10 20:12:47 UTC (rev 287056)
+++ phpdoc/en/trunk/reference/spl/book.xml 2009-08-10 20:40:34 UTC (rev 287057)
@@ -30,11 +30,11 @@
&reference.spl.arrayobject;
&reference.spl.splfileinfo;
&reference.spl.splfileobject;
+ &reference.spl.spltempfileobject;
<!-- TODO: Not documented
&reference.spl.splfixedarray;
&reference.spl.splobjectstorage;
- &reference.spl.spltempfileobject;
-->
</book>
Added: phpdoc/en/trunk/reference/spl/spltempfileobject/construct.xml
===================================================================
--- phpdoc/en/trunk/reference/spl/spltempfileobject/construct.xml (rev 0)
+++ phpdoc/en/trunk/reference/spl/spltempfileobject/construct.xml 2009-08-10 20:40:34 UTC (rev
287057)
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+
+<refentry xml:id="spltempfileobject.construct" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+ <refname>SplTempFileObject::__construct</refname>
+ <refpurpose>Construct a new temporary file object</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <methodname>SplTempFileObject::__construct</methodname>
+ <methodparam
choice="opt"><type>integer</type><parameter>max_memory</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ Construct a new temporary file object.
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>max_memory</parameter></term>
+ <listitem>
+ <para>
+ The maximum amount of memory (in bytes, default is 2 MB) for
+ the temporary file to use. If the temporary file exceeds this
+ size, it will be moved to a file in the system's temp directory.
+ </para>
+ <para>
+ If <parameter>max_memory</parameter> is negative, only memory
+ will be used. If <parameter>max_memory</parameter> is zero,
+ no memory will be used.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ &return.void;
+ </para>
+ </refsect1>
+
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <para>
+ Throws a <classname>RuntimeException</classname> if an error occurs.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><methodname>SplTempFileObject</methodname> example</title>
+ <para>This example writes a temporary file in memory which can be written to and read
from.</para>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$temp = new SplTempFileObject();
+$temp->fwrite("This is the first line\n");
+$temp->fwrite("And this is the second.\n");
+echo "Written " . $temp->ftell() . " bytes to temporary file.\n\n";
+
+// Rewind and read what was written
+$temp->rewind();
+foreach ($temp as $line) {
+ echo $line;
+}
+?>
+]]>
+ </programlisting>
+ &example.outputs.similar;
+ <screen>
+<![CDATA[
+Written 47 bytes to temporary file.
+
+This is the first line
+And this is the second.
+]]>
+ </screen>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><classname>SplFileObject</classname></member>
+ <member>
+ <link linkend="wrappers.php">PHP input/output streams</link>
+ (for <literal>php://temp</literal> and
<literal>php://memory</literal>)
+ </member>
+ </simplelist>
+ </para>
+ </refsect1>
+
+</refentry>
+
+<!-- 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
+-->
Added: phpdoc/en/trunk/reference/spl/spltempfileobject.xml
===================================================================
--- phpdoc/en/trunk/reference/spl/spltempfileobject.xml (rev 0)
+++ phpdoc/en/trunk/reference/spl/spltempfileobject.xml 2009-08-10 20:40:34 UTC (rev 287057)
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+
+<phpdoc:classref xml:id="class.spltempfileobject" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <title>The SplTempFileObject class</title>
+ <titleabbrev>SplTempFileObject</titleabbrev>
+
+ <partintro>
+
+<!-- {{{ SplTempFileObject intro -->
+ <section xml:id="spltempfileobject.intro">
+ &reftitle.intro;
+ <para>
+ The SplTempFileObject class offers an object oriented interface for a temporary file.
+ </para>
+ </section>
+<!-- }}} -->
+
+ <section xml:id="spltempfileobject.synopsis">
+ &reftitle.classsynopsis;
+
+<!-- {{{ Synopsis -->
+ <classsynopsis>
+ <ooclass><classname>SplTempFileObject</classname></ooclass>
+
+<!-- {{{ Class synopsis -->
+ <classsynopsisinfo>
+ <ooclass>
+ <classname>SplTempFileObject</classname>
+ </ooclass>
+
+ <ooclass>
+ <modifier>extends</modifier>
+ <classname>SplFileObject</classname>
+ </ooclass>
+
+ <oointerface>
+ <interfacename>SeekableIterator</interfacename>
+ </oointerface>
+
+ <oointerface>
+ <interfacename>Iterator</interfacename>
+ </oointerface>
+
+ <oointerface>
+ <interfacename>Traversable</interfacename>
+ </oointerface>
+
+ <oointerface>
+ <interfacename>RecursiveIterator</interfacename>
+ </oointerface>
+ </classsynopsisinfo>
+<!-- }}} -->
+
+ <classsynopsisinfo role="comment">Methods</classsynopsisinfo>
+ <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('class.spltempfileobject')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])"
/>
+
+ <classsynopsisinfo role="comment">Inherited methods</classsynopsisinfo>
+ <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('class.splfileobject')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])"
/>
+
+ </classsynopsis>
+<!-- }}} -->
+
+ </section>
+
+ </partintro>
+
+ &reference.spl.entities.spltempfileobject;
+
+</phpdoc:classref>
+
+<!-- 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
+-->