pollita         Tue Apr  6 18:54:03 2004 EDT

  Added files:                 
    /phpdoc/en/appendices       filters.xml 

  Modified files:              
    /phpdoc     manual.xml.in 
  Log:
  Document built-in filters and their accepted parameters.
  
  
http://cvs.php.net/diff.php/phpdoc/manual.xml.in?r1=1.166&r2=1.167&ty=u
Index: phpdoc/manual.xml.in
diff -u phpdoc/manual.xml.in:1.166 phpdoc/manual.xml.in:1.167
--- phpdoc/manual.xml.in:1.166  Sun Mar 28 05:08:24 2004
+++ phpdoc/manual.xml.in        Tue Apr  6 18:54:03 2004
@@ -258,6 +258,7 @@
   &appendices.reserved;
   &appendices.resources;
   &appendices.wrappers;
+  &appendices.filters;
   &appendices.transports;
   &appendices.comparisons;
   &appendices.tokens;

http://cvs.php.net/co.php/phpdoc/en/appendices/filters.xml?r=1.1&p=1
Index: phpdoc/en/appendices/filters.xml
+++ phpdoc/en/appendices/filters.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<appendix id="filters">
 <title>List of Built-In Filters</title>
 <para>
  The following is a list of a few built-in stream filters for
  use with <function>stream_filter_append</function>.
  Your version of PHP may have more filters (or fewer) than those
  listed here.
 </para>

 <para>
  It is worth noting a slight asymmetry between 
  <function>stream_filter_append</function>
  and <function>stream_filter_prepend</function>.  
  Every PHP stream contains a small <emphasis>read buffer</emphasis>
  where it stores blocks of data retrieved from the
  filesystem or other resource in order to process data
  in the most efficient manner.  As soon as data is pulled
  from the resource into the stream's internal buffer, it
  is immediately processed through any attached filters whether
  the PHP application is actually ready for the data or not.
  If data is sitting in the read buffer when a filter is 
  <emphasis>appended</emphasis>, this data will be immediately
  processed through that buffer making the fact that is was
  sitting in the buffer seem transparent.  However, if data is
  sitting in the read buffer when a filter is 
  <emphasis>prepended</emphasis>, this data will <emphasis>NOT</emphasis>
  be processed through that filter.  It will instead wait until
  the next block of data is retrieved from the resource.
 </para>

 <para>
  For a list of filters installed in your version of
  <literal>PHP</literal> use <function>stream_get_filters</function>.
 </para>

 <section id="filters.string">
  <title>String Filters</title>

  <simpara>
   Each of these filters does precisely what their name implies and
   correspond to the behavior of a built-in php string handling function.
   For more information on a given filter, refer to the manual page for
   the corresponding function.
  </simpara>

  <para>
   <table>
    <title>
     String Filters
    </title>
    <tgroup cols="4">
     <thead>
      <row>
       <entry>Name</entry>
       <entry>PHP Function equivalent</entry>
       <entry>Since Version</entry>
       <entry>Parameters</entry>
      </row>
     </thead>
     <tbody>
      <row>
       <entry><literal>string.rot13</literal></entry>
       <entry>
        <function>str_rot13</function>
       </entry>
       <entry><literal>PHP 4.3.0</literal></entry>
       <entry>None</entry>
      </row>
      <row>
       <entry><literal>string.toupper</literal></entry>
       <entry>
        <function>strtoupper</function>
       </entry>
       <entry><literal>PHP 5.0.0</literal></entry>
       <entry>None</entry>
      </row>
      <row>
       <entry><literal>string.tolower</literal></entry>
       <entry>
        <function>strtolower</function>
       </entry>
       <entry><literal>PHP 5.0.0</literal></entry>
       <entry>None</entry>
      </row>
      <row>
       <entry><literal>string.strip_tags</literal></entry>
       <entry>
        <function>strip_tags</function>
       </entry>
       <entry><literal>PHP 5.0.0</literal></entry>
       <entry>
        String containing allowable tags, similar to second parameter of 
<function>strip_tags</function>.
        May also be an array containing list of tags (excluding &lt;&gt; symbols).
       </entry>
      </row>
     </tbody>
    </tgroup>
   </table>
  </para>
 </section>

 <section id="filters.convert">
  <title>Conversion Filters</title>

  <simpara>
   Like the string.* filters, the convert.* filters perform actions
   similar to their names.
   For more information on a given filter, refer to the manual page for
   the corresponding function.
  </simpara>

  <para>
   <table>
    <title>
     Convert Filters
    </title>
    <tgroup cols="4">
     <thead>
      <row>
       <entry>Name</entry>
       <entry>PHP Function equivalent</entry>
       <entry>Since Version</entry>
       <entry>Parameters</entry>
      </row>
     </thead>
     <tbody>
      <row>
       <entry><literal>convert.base64-encode</literal></entry>
       <entry>
        <function>base64_encode</function>
       </entry>
       <entry><literal>PHP 5.0.0</literal></entry>
       <entry>
        If parameters are provided as an associative array, 
        <literal>convert.base64-encode</literal> will insert the value of
        <literal>$parameters['line-break-chars']</literal> every 
<literal>$parameters['line-length']</literal>
        characters of base64 output.  This allow automatic formatting of encoded 
output 
        otherwise acheived using <function>chunk_split</function>.
       </entry>
      </row>
      <row>
       <entry><literal>convert.base64-decode</literal></entry>
       <entry>
        <function>base64_decode</function>
       </entry>
       <entry><literal>PHP 5.0.0</literal></entry>
       <entry>None</entry>
      </row>
      <row>
       <entry><literal>convert.quoted-printable-encode</literal></entry>
       <entry>
        None.  This is the counterpart to quoted-pritnable-decode.
       </entry>
       <entry><literal>PHP 5.0.0</literal></entry>
       <entry>
        <literal>line-break-chars</literal> and <literal>line-length</literal> are 
supported
        in the same manner as <literal>convert.base64-encode</literal> above.  In 
addition,
        <literal>binary</literal> and <literal>force-encode-first</literal> are 
supported as
        boolean values which default to &false;.
       </entry>
      </row>
      <row>
       <entry><literal>convert.quoted-printable-decode</literal></entry>
       <entry>
        <function>quoted_printable_decode</function>
       </entry>
       <entry><literal>PHP 5.0.0</literal></entry>
       <entry>
        If <literal>line-break-chars</literal> were specified during the encoding 
process,
        they should be specified here again in order to be stripped out for a 
successful decode.
       </entry>
      </row>
     </tbody>
    </tgroup>
   </table>
  </para>

 </section>

</appendix>

<!-- 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
-->

Reply via email to