cvs: peardoc /en/package/mail mail-mbox.xml /en/package/mail/mail-mbox tutorial.xml /en/package/mail/mail-mbox/mail-mbox -move.xml -process.xml
close.xml get.xml getdebug.xml gettmpdir.xml hasbeenmodified.xml insert.xml mail-mbox.xml open.xml remove.xml setdebug.xml settmpdir.xml size.xml
update.xml

From: Date: Wed, 28 Jun 2006 16:55:24 +0000
Subject: cvs: peardoc /en/package/mail mail-mbox.xml /en/package/mail/mail-mbox tutorial.xml /en/package/mail/mail-mbox/mail-mbox -move.xml -process.xml
close.xml get.xml getdebug.xml gettmpdir.xml hasbeenmodified.xml insert.xml mail-mbox.xml open.xml remove.xml setdebug.xml settmpdir.xml size.xml
update.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-8074@lists.php.net to get a copy of this message
cweiske Wed Jun 28 16:55:24 2006 UTC Added files: /peardoc/en/package/mail mail-mbox.xml /peardoc/en/package/mail/mail-mbox tutorial.xml /peardoc/en/package/mail/mail-mbox/mail-mbox -move.xml -process.xml close.xml get.xml getdebug.xml gettmpdir.xml hasbeenmodified.xml insert.xml mail-mbox.xml open.xml remove.xml setdebug.xml settmpdir.xml size.xml update.xml Log: Adding Mail_Mbox documentation

http://cvs.php.net/viewvc.cgi/peardoc/en/package/mail/mail-mbox.xml?view=markup&rev=1.1 Index: peardoc/en/package/mail/mail-mbox.xml +++ peardoc/en/package/mail/mail-mbox.xml <sect1 id="package.mail.mail-mbox"> <title>Mail_Mbox</title> <refentry id="package.mail.mail-mbox.mail-mbox-summary"> <refnamediv> <refname> Class Summary <classname>Mail_Mbox</classname> </refname> <refpurpose>Class to read mbox mail files.</refpurpose> </refnamediv> <refsect1> <title>Reading and writing mbox files.</title> <para> An mbox mail file is contains plain emails concatenated in one big file. Since each mail starts with &quot;From &quot;, and ends with a newline, they can be separated from each other. </para> <para> This class takes a mbox filename in the constructor, generates an index where the mails start and end when calling <link linkend="package.mail.mail-mbox.mail-mbox.open">open()</link> and returns single mails with <link linkend="package.mail.mail-mbox.mail-mbox.get">get()</link>, using the positions in the index. </para> <para> With the help of this class, you also can <link linkend="package.mail.mail-mbox.mail-mbox.insert">insert()</link>, <link linkend="package.mail.mail-mbox.mail-mbox.remove">remove()</link> and <link linkend="package.mail.mail-mbox.mail-mbox.update">update()</link> messages in the mbox file. When calling one of this methods, the class checks if the file has been modified since the index was created - changing the file with the wrong positions in the index would very likely corrupt it. This check is not done when retrieving single messages via <link linkend="package.mail.mail-mbox.mail-mbox.get">get()</link>, as this would slow down the process if you retrieve thousands of mails. You can, however, call <link linkend="package.mail.mail-mbox.mail-mbox.hasbeenmodified">hasBeenModified()</link> before using <link linkend="package.mail.mail-mbox.mail-mbox.get">get()</link> to check for modification yourself. If the method returns true, you should <link linkend="package.mail.mail-mbox.mail-mbox.close">close()</link> and re-<link linkend="package.mail.mail-mbox.mail-mbox.open">open()</link> the file. </para> <para> If something strange happens and you don&apos;t know why, activate debugging with <link linkend="package.mail.mail-mbox.mail-mbox.setdebug">setDebug(true)</link>. You also can modify the temporary directory in which changed mboxes are stored when adding/removing/modifying by using <link linkend="package.mail.mail-mbox.mail-mbox.settmpdir">setTmpDir(&apos;/path/&apos;)</link> </para> </refsect1> <refsect1> <title> Class Tree for <classname>Mail_Mbox</classname> </title> <para> <itemizedlist> <listitem> <para> PEAR <itemizedlist> <listitem> <para>Mail_Mbox</para> </listitem> </itemizedlist> </para> </listitem> </itemizedlist> </para> </refsect1> </refentry> &package.mail.mail-mbox.tutorial; &package.mail.mail-mbox.mail-mbox.mail-mbox; &package.mail.mail-mbox.mail-mbox.close; &package.mail.mail-mbox.mail-mbox.get; &package.mail.mail-mbox.mail-mbox.getdebug; &package.mail.mail-mbox.mail-mbox.gettmpdir; &package.mail.mail-mbox.mail-mbox.hasbeenmodified; &package.mail.mail-mbox.mail-mbox.insert; &package.mail.mail-mbox.mail-mbox.open; &package.mail.mail-mbox.mail-mbox.remove; &package.mail.mail-mbox.mail-mbox.setdebug; &package.mail.mail-mbox.mail-mbox.settmpdir; &package.mail.mail-mbox.mail-mbox.size; &package.mail.mail-mbox.mail-mbox.update; &package.mail.mail-mbox.mail-mbox.-move; &package.mail.mail-mbox.mail-mbox.-process; </sect1> http://cvs.php.net/viewvc.cgi/peardoc/en/package/mail/mail-mbox/tutorial.xml?view=markup&rev=1.1 Index: peardoc/en/package/mail/mail-mbox/tutorial.xml +++ peardoc/en/package/mail/mail-mbox/tutorial.xml <refentry id="package.mail.mail-mbox.tutorial"> <refnamediv> <refname>Tutorial</refname> <refpurpose>How to use Mail_Mbox</refpurpose> </refnamediv> <refsect1> <title>How to use Mail_Mbox</title> <para> Before you can do anything with the mbox file, you need to <link linkend="package.mail.mail-mbox.mail-mbox.mail-mbox">create an instance</link> of the <classname>Mail_Mbox</classname> class and <link linkend="package.mail.mail-mbox.mail-mbox.open">open()</link> it. </para> <programlisting role="php"> <![CDATA[ <?php require_once 'Mail/Mbox.php'; $mbox = new Mail_Mbox('/path/to/mbox'); $mbox->open(); //do more here ?> ]]> </programlisting> <para> After opening the file, you can retrieve single messages via <link linkend="package.mail.mail-mbox.mail-mbox.get">get()</link>. The <link linkend="package.mail.mail-mbox.mail-mbox.size">size()</link> method helps you to determine the number of messages: </para> <programlisting role="php"> <![CDATA[ <?php //... initialisation for ($n = 0; $n < $mbox->size(); $n++) { $message = $mbox->get($n); //do something with the message text } ?> ]]> </programlisting> <para> If you're done working with the file, <link linkend="package.mail.mail-mbox.mail-mbox.close">close()</link> it. </para> <programlisting role="php"> <![CDATA[ <?php //... other code $mbox->close(); ?> ]]> </programlisting> <para> Also have a look at the Mail_Mbox examples directory in <filename>/path/to/pear/docs/Mail_Mbox/examples/</filename>. </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/mail/mail-mbox/mail-mbox/-move.xml?view=markup&rev=1.1 Index: peardoc/en/package/mail/mail-mbox/mail-mbox/-move.xml +++ peardoc/en/package/mail/mail-mbox/mail-mbox/-move.xml <refentry id="package.mail.mail-mbox.mail-mbox.-move"> <refnamediv> <refname> <function>Mail_Mbox::_move</function> </refname> <refpurpose>Copy a file to another</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;/Mbox.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> void <function>Mail_Mbox::_move</function> </funcdef> <paramdef> string <parameter>$ftempname</parameter> </paramdef> <paramdef> string <parameter>$filename</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.mail.mail-mbox.mail-mbox.-move.desc"> &title.desc; <para>Used internally to copy the content of the temp file to the mbox file</para> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.-move.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$ftempname</parameter> </term> <listitem> <para>Source file - will be removed</para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.string; <parameter>$filename</parameter> </term> <listitem> <para>Output file</para> </listitem> </varlistentry> </variablelist> </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/mail/mail-mbox/mail-mbox/-process.xml?view=markup&rev=1.1 Index: peardoc/en/package/mail/mail-mbox/mail-mbox/-process.xml +++ peardoc/en/package/mail/mail-mbox/mail-mbox/-process.xml <refentry id="package.mail.mail-mbox.mail-mbox.-process"> <refnamediv> <refname> <function>Mail_Mbox::_process</function> </refname> <refpurpose>Process the Mbox</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;/Mbox.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> void <function>Mail_Mbox::_process</function> </funcdef> <paramdef /> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.mail.mail-mbox.mail-mbox.-process.desc"> &title.desc; <para> <itemizedlist> <listitem> <para>Get start bytes and end bytes of each messages</para> </listitem> </itemizedlist> </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/mail/mail-mbox/mail-mbox/close.xml?view=markup&rev=1.1 Index: peardoc/en/package/mail/mail-mbox/mail-mbox/close.xml +++ peardoc/en/package/mail/mail-mbox/mail-mbox/close.xml <refentry id="package.mail.mail-mbox.mail-mbox.close"> <refnamediv> <refname> <function>Mail_Mbox::close</function> </refname> <refpurpose>Close a Mbox</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;/Mbox.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> mixed <function>Mail_Mbox::close</function> </funcdef> <paramdef /> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.mail.mail-mbox.mail-mbox.close.desc"> &title.desc; <para> Close the Mbox file opened by <link linkend="package.mail.mail-mbox.mail-mbox.open">open()</link>. </para> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.close.returns"> &title.returns; <para> <emphasis>returns</emphasis> true on success, else <classname>PEAR_Error</classname> </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/mail/mail-mbox/mail-mbox/get.xml?view=markup&rev=1.1 Index: peardoc/en/package/mail/mail-mbox/mail-mbox/get.xml +++ peardoc/en/package/mail/mail-mbox/mail-mbox/get.xml <refentry id="package.mail.mail-mbox.mail-mbox.get"> <refnamediv> <refname> <function>Mail_Mbox::get</function> </refname> <refpurpose>Get a message from the mbox</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;/Mbox.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> string <function>Mail_Mbox::get</function> </funcdef> <paramdef> int <parameter>$message</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.mail.mail-mbox.mail-mbox.get.desc"> &title.desc; <para> Returns the full email message at the given position. </para> <para>Note: Message number start from 0.</para> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.get.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.int; <parameter>$message</parameter> </term> <listitem> <para>The number of the message to retrieve</para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.get.returns"> &title.returns; <para> <emphasis>returns</emphasis> Return the message, <classname>PEAR_Error</classname> on error </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/mail/mail-mbox/mail-mbox/getdebug.xml?view=markup&rev=1.1 Index: peardoc/en/package/mail/mail-mbox/mail-mbox/getdebug.xml +++ peardoc/en/package/mail/mail-mbox/mail-mbox/getdebug.xml <refentry id="package.mail.mail-mbox.mail-mbox.getdebug"> <refnamediv> <refname> <function>Mail_Mbox::getDebug</function> </refname> <refpurpose>Returns the debug flag setting</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;/Mbox.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> boolean <function>Mail_Mbox::getDebug</function> </funcdef> <paramdef /> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.mail.mail-mbox.mail-mbox.getdebug.desc"> &title.desc; <para> Returns if debugging is enabled. </para> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.getdebug.returns"> &title.returns; <para> <emphasis>returns</emphasis> If debug is enabled. </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/mail/mail-mbox/mail-mbox/gettmpdir.xml?view=markup&rev=1.1 Index: peardoc/en/package/mail/mail-mbox/mail-mbox/gettmpdir.xml +++ peardoc/en/package/mail/mail-mbox/mail-mbox/gettmpdir.xml <refentry id="package.mail.mail-mbox.mail-mbox.gettmpdir"> <refnamediv> <refname> <function>Mail_Mbox::getTmpDir</function> </refname> <refpurpose>Returns the temporary directory</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;/Mbox.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> string <function>Mail_Mbox::getTmpDir</function> </funcdef> <paramdef /> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.mail.mail-mbox.mail-mbox.gettmpdir.desc"> &title.desc; <para> Returns the temporary directory. </para> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.gettmpdir.returns"> &title.returns; <para> <emphasis>returns</emphasis> The temporary directory </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/mail/mail-mbox/mail-mbox/hasbeenmodified.xml?view=markup&rev=1.1 Index: peardoc/en/package/mail/mail-mbox/mail-mbox/hasbeenmodified.xml +++ peardoc/en/package/mail/mail-mbox/mail-mbox/hasbeenmodified.xml <refentry id="package.mail.mail-mbox.mail-mbox.hasbeenmodified"> <refnamediv> <refname> <function>Mail_Mbox::hasBeenModified</function> </refname> <refpurpose>Checks if the file was modified since it has been loaded.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;/Mbox.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> boolean <function>Mail_Mbox::hasBeenModified</function> </funcdef> <paramdef /> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.mail.mail-mbox.mail-mbox.hasbeenmodified.desc"> &title.desc; <para> Checks if the mbox file has been modified since opening. If this is true, the file needs to be re-opened. </para> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.hasbeenmodified.returns"> &title.returns; <para> <emphasis>returns</emphasis> True if it has been modified. </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/mail/mail-mbox/mail-mbox/insert.xml?view=markup&rev=1.1 Index: peardoc/en/package/mail/mail-mbox/mail-mbox/insert.xml +++ peardoc/en/package/mail/mail-mbox/mail-mbox/insert.xml <refentry id="package.mail.mail-mbox.mail-mbox.insert"> <refnamediv> <refname> <function>Mail_Mbox::insert</function> </refname> <refpurpose>Insert a message</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;/Mbox.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> mixed <function>Mail_Mbox::insert</function> </funcdef> <paramdef> string <parameter>$content</parameter> </paramdef> <paramdef> mixed <parameter> <optional>$offset = &null;</optional> </parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.mail.mail-mbox.mail-mbox.insert.desc"> &title.desc; <para> Mail_Mbox will insert the message according its offset. (Remember: message 3 is the forth message). The default is inserting it AFTER the last message (offset = null). </para> <para>Note: Mail_Mbox automatically adds \n\n at end of the message</para> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.insert.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$content</parameter> </term> <listitem> <para>The content of the new message</para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.mixed; <parameter>$offset</parameter> </term> <listitem> <para /> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.insert.returns"> &title.returns; <para> <emphasis>returns</emphasis> Return true else <classname>PEAR_Error</classname> object. </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/mail/mail-mbox/mail-mbox/mail-mbox.xml?view=markup&rev=1.1 Index: peardoc/en/package/mail/mail-mbox/mail-mbox/mail-mbox.xml +++ peardoc/en/package/mail/mail-mbox/mail-mbox/mail-mbox.xml <refentry id="package.mail.mail-mbox.mail-mbox.mail-mbox"> <refnamediv> <refname> constructor <function>Mail_Mbox::Mail_Mbox</function> </refname> <refpurpose>Create a new Mbox class instance.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;/Mbox.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> void constructor <function>Mail_Mbox::Mail_Mbox</function> </funcdef> <paramdef> string <parameter>$file</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.mail.mail-mbox.mail-mbox.mail-mbox.desc"> &title.desc; <para> After creating it, you should use <link linkend="package.mail.mail-mbox.mail-mbox.open">open()</link> </para> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.mail-mbox.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$file</parameter> </term> <listitem> <para>Filename to open.</para> </listitem> </varlistentry> </variablelist> </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/mail/mail-mbox/mail-mbox/open.xml?view=markup&rev=1.1 Index: peardoc/en/package/mail/mail-mbox/mail-mbox/open.xml +++ peardoc/en/package/mail/mail-mbox/mail-mbox/open.xml <refentry id="package.mail.mail-mbox.mail-mbox.open"> <refnamediv> <refname> <function>Mail_Mbox::open</function> </refname> <refpurpose>Open the mbox file</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;/Mbox.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> void <function>Mail_Mbox::open</function> </funcdef> <paramdef /> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.mail.mail-mbox.mail-mbox.open.desc"> &title.desc; <para>Also, this function will process the Mbox and create a cache that tells each message start and end bytes.</para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/mail/mail-mbox/mail-mbox/remove.xml?view=markup&rev=1.1 Index: peardoc/en/package/mail/mail-mbox/mail-mbox/remove.xml +++ peardoc/en/package/mail/mail-mbox/mail-mbox/remove.xml <refentry id="package.mail.mail-mbox.mail-mbox.remove"> <refnamediv> <refname> <function>Mail_Mbox::remove</function> </refname> <refpurpose>Remove a message from Mbox and save it.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;/Mbox.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> mixed <function>Mail_Mbox::remove</function> </funcdef> <paramdef> int <parameter>$message</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.mail.mail-mbox.mail-mbox.remove.desc"> &title.desc; <para>Removes the message with the given id.</para> <note> <para>Note: messages start with 0.</para> </note> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.remove.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.int; <parameter>$message</parameter> </term> <listitem> <para> The number of the message to remove, or array of message ids to remove </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.remove.returns"> &title.returns; <para> <emphasis>returns</emphasis> Return true else PEAR_Error </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/mail/mail-mbox/mail-mbox/setdebug.xml?view=markup&rev=1.1 Index: peardoc/en/package/mail/mail-mbox/mail-mbox/setdebug.xml +++ peardoc/en/package/mail/mail-mbox/mail-mbox/setdebug.xml <refentry id="package.mail.mail-mbox.mail-mbox.setdebug"> <refnamediv> <refname> <function>Mail_Mbox::setDebug</function> </refname> <refpurpose>Set the debug flag</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;/Mbox.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> void <function>Mail_Mbox::setDebug</function> </funcdef> <paramdef> boolean <parameter>$debug</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.mail.mail-mbox.mail-mbox.setdebug.desc"> &title.desc; <para> Sets the debug flag. If debugging is enabled, you will get more output. </para> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.setdebug.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.bool; <parameter>$debug</parameter> </term> <listitem> <para>If debug is on or off</para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.setdebug.see"> &title.see; <para> <emphasis>see</emphasis> <varname>Mail_Mbox::$debug</varname> </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/mail/mail-mbox/mail-mbox/settmpdir.xml?view=markup&rev=1.1 Index: peardoc/en/package/mail/mail-mbox/mail-mbox/settmpdir.xml +++ peardoc/en/package/mail/mail-mbox/mail-mbox/settmpdir.xml <refentry id="package.mail.mail-mbox.mail-mbox.settmpdir"> <refnamediv> <refname> <function>Mail_Mbox::setTmpDir</function> </refname> <refpurpose>Set the directory for temporary files.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;/Mbox.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> void <function>Mail_Mbox::setTmpDir</function> </funcdef> <paramdef> string <parameter>$tmpdir</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.mail.mail-mbox.mail-mbox.settmpdir.desc"> &title.desc; <para> Sets the temporary directory in which new mbox files are stored. </para> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.settmpdir.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$tmpdir</parameter> </term> <listitem> <para>The new temporary directory</para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.settmpdir.see"> &title.see; <para> <emphasis>see</emphasis> <varname>Mail_Mbox::$tmpdir</varname> </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/mail/mail-mbox/mail-mbox/size.xml?view=markup&rev=1.1 Index: peardoc/en/package/mail/mail-mbox/mail-mbox/size.xml +++ peardoc/en/package/mail/mail-mbox/mail-mbox/size.xml <refentry id="package.mail.mail-mbox.mail-mbox.size"> <refnamediv> <refname> <function>Mail_Mbox::size</function> </refname> <refpurpose>Get number of messages in this mbox</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;/Mbox.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> int <function>Mail_Mbox::size</function> </funcdef> <paramdef /> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.mail.mail-mbox.mail-mbox.size.desc"> &title.desc; <para> Returns the number of messages in the mbox file. </para> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.size.returns"> &title.returns; <para> <emphasis>returns</emphasis> Number of messages on Mbox (starting on 1, 0 if no message exists) </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/mail/mail-mbox/mail-mbox/update.xml?view=markup&rev=1.1 Index: peardoc/en/package/mail/mail-mbox/mail-mbox/update.xml +++ peardoc/en/package/mail/mail-mbox/mail-mbox/update.xml <refentry id="package.mail.mail-mbox.mail-mbox.update"> <refnamediv> <refname> <function>Mail_Mbox::update</function> </refname> <refpurpose>Update a message</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;/Mbox.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> mixed <function>Mail_Mbox::update</function> </funcdef> <paramdef> int <parameter>$message</parameter> </paramdef> <paramdef> string <parameter>$content</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.mail.mail-mbox.mail-mbox.update.desc"> &title.desc; <para> Replaces a given message with the text passed to this method. </para> <note><para>Mail_Mbox auto adds \n\n at end of the message</para></note> <note><para>messages start with 0.</para></note> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.update.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.int; <parameter>$message</parameter> </term> <listitem> <para>The number of Message to updated</para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.string; <parameter>$content</parameter> </term> <listitem> <para>The new content of the Message</para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.mail.mail-mbox.mail-mbox.update.returns"> &title.returns; <para> <emphasis>returns</emphasis> Return true if all is ok, else <classname>PEAR_Error</classname> </para> </refsect1> </refentry>
« previous php.pear.doc (#8074) next »