cvs: phpdoc /en/reference/filter book.xml constants.xml reference.xml setup.xml /en/reference/filter/functions filter-input-array.xml
filter-var-array.xml
| From: | Hannes Magnusson | Date: | Sat, 22 Dec 2007 00:38:47 +0000 |
| Subject: | cvs: phpdoc /en/reference/filter book.xml constants.xml reference.xml setup.xml /en/reference/filter/functions filter-input-array.xml filter-var-array.xml |
||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-715@lists.php.net to get a copy of this message | ||
bjori Sat Dec 22 00:38:47 2007 UTC
Modified files:
/phpdoc/en/reference/filter book.xml setup.xml constants.xml
reference.xml
/phpdoc/en/reference/filter/functions filter-input-array.xml
filter-var-array.xml
Log:
MFB: Upgrade to the new-reference-structure
- (Created missing setup sections in setup.xml, if any)
- Moved the intro (the giant table) to book.xml
- Changed the intro ID from <extname>.intro to intro.<extname>
- Moved the constants entity to book.xml
- Changed constants.xml to be an appendix
- Moved the requirements and resources sections to setup.xml
- Moved the configure (installation section) and ini entities to setup.xml
NOTE: Also fixed the linkend in functions/filter-var-array.xml &
functions/filter-input-array.xml
to point to the constants section
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filter/book.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc/en/reference/filter/book.xml diff -u /dev/null phpdoc/en/reference/filter/book.xml:1.2 --- /dev/null Sat Dec 22 00:38:47 2007 +++ phpdoc/en/reference/filter/book.xml Sat Dec 22 00:38:47 2007 @@ -0,0 +1,272 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- Purpose: basic.vartype --> + +<book xml:id="book.filter" xmlns="http://docbook.org/ns/docbook"> + <title>Filter Functions</title> + <titleabbrev>Filter</titleabbrev> + + <preface xml:id="intro.filter"> + &reftitle.intro; + <para> + This extension serves to validate and filter data coming from some insecure + source, such as user input. + </para> + <para> + The following filters currently exist; be sure to read the + <link linkend="filter.constants">Filter Constants</link> section + for information that describes the behavior of each constant: + <table> + <title>Existing filters</title> + <tgroup cols="5"> + <thead> + <row> + <entry>ID</entry> + <entry>Name</entry> + <entry>Options</entry> + <entry>Flags</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry><constant>FILTER_VALIDATE_INT</constant></entry> + <entry>"int"</entry> + <entry> + <parameter>min_range</parameter>, + <parameter>max_range</parameter> + </entry> + <entry> + <constant>FILTER_FLAG_ALLOW_OCTAL</constant>, + <constant>FILTER_FLAG_ALLOW_HEX</constant> + </entry> + <entry>Validates value as integer, optionally from the specified range.</entry> + </row> + <row> + <entry><constant>FILTER_VALIDATE_BOOLEAN</constant></entry> + <entry>"boolean"</entry> + <entry></entry> + <entry> + <constant>FILTER_NULL_ON_FAILURE</constant> + </entry> + <entry> + <para> + Returns &true; for "1", "true", "on" and "yes". + Returns &false; otherwise. + </para> + <para> + If <constant>FILTER_NULL_ON_FAILURE</constant> is set, &false; is + returned only for "0", "false", "off", "no", and "", and + &null; is returned for all non-boolean values. + </para> + </entry> + </row> + <row> + <entry><constant>FILTER_VALIDATE_FLOAT</constant></entry> + <entry>"float"</entry> + <entry> + <parameter>decimal</parameter> + </entry> + <entry> + <constant>FILTER_FLAG_ALLOW_THOUSAND</constant> + </entry> + <entry>Validates value as float.</entry> + </row> + + <row> + <entry><constant>FILTER_VALIDATE_REGEXP</constant></entry> + <entry>"validate_regexp"</entry> + <entry> + <parameter>regexp</parameter> + </entry> + <entry></entry> + <entry> + Validates value against <parameter>regexp</parameter>, a + <link linkend="book.pcre">Perl-compatible</link> regular expression. + </entry> + </row> + <row> + <entry><constant>FILTER_VALIDATE_URL</constant></entry> + <entry>"validate_url"</entry> + <entry></entry> + <entry> + <constant>FILTER_FLAG_PATH_REQUIRED</constant>, + <constant>FILTER_FLAG_QUERY_REQUIRED</constant> + </entry> + <entry>Validates value as URL, optionally with required components.</entry> + </row> + <row> + <entry><constant>FILTER_VALIDATE_EMAIL</constant></entry> + <entry>"validate_email"</entry> + <entry></entry> + <entry></entry> + <entry>Validates value as e-mail.</entry> + </row> + <row> + <entry><constant>FILTER_VALIDATE_IP</constant></entry> + <entry>"validate_ip"</entry> + <entry></entry> + <entry> + <constant>FILTER_FLAG_IPV4</constant>, + <constant>FILTER_FLAG_IPV6</constant>, + <constant>FILTER_FLAG_NO_PRIV_RANGE</constant>, + <constant>FILTER_FLAG_NO_RES_RANGE</constant> + </entry> + <entry> + Validates value as IP address, optionally only IPv4 or IPv6 or not + from private or reserved ranges. + </entry> + </row> + + <row> + <entry><constant>FILTER_SANITIZE_STRING</constant></entry> + <entry>"string"</entry> + <entry></entry> + <entry> + <constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant>, + <constant>FILTER_FLAG_STRIP_LOW</constant>, + <constant>FILTER_FLAG_STRIP_HIGH</constant>, + <constant>FILTER_FLAG_ENCODE_LOW</constant>, + <constant>FILTER_FLAG_ENCODE_HIGH</constant>, + <constant>FILTER_FLAG_ENCODE_AMP</constant> + </entry> + <entry>Strip tags, optionally strip or encode special characters.</entry> + </row> + <row> + <entry><constant>FILTER_SANITIZE_STRIPPED</constant></entry> + <entry>"stripped"</entry> + <entry></entry> + <entry></entry> + <entry>Alias of "string" filter.</entry> + </row> + <row> + <entry><constant>FILTER_SANITIZE_ENCODED</constant></entry> + <entry>"encoded"</entry> + <entry></entry> + <entry> + <constant>FILTER_FLAG_STRIP_LOW</constant>, + <constant>FILTER_FLAG_STRIP_HIGH</constant>, + <constant>FILTER_FLAG_ENCODE_LOW</constant>, + <constant>FILTER_FLAG_ENCODE_HIGH</constant> + </entry> + <entry>URL-encode string, optionally strip or encode special characters.</entry> + </row> + <row> + <entry><constant>FILTER_SANITIZE_SPECIAL_CHARS</constant></entry> + <entry>"special_chars"</entry> + <entry></entry> + <entry> + <constant>FILTER_FLAG_STRIP_LOW</constant>, + <constant>FILTER_FLAG_STRIP_HIGH</constant>, + <constant>FILTER_FLAG_ENCODE_HIGH</constant> + </entry> + <entry> + HTML-escape <literal>'"<>&</literal> and characters with + ASCII value less than 32, optionally strip or encode other special + characters. + </entry> + </row> + <row> + <entry><constant>FILTER_UNSAFE_RAW</constant></entry> + <entry>"unsafe_raw"</entry> + <entry></entry> + <entry> + <constant>FILTER_FLAG_STRIP_LOW</constant>, + <constant>FILTER_FLAG_STRIP_HIGH</constant>, + <constant>FILTER_FLAG_ENCODE_LOW</constant>, + <constant>FILTER_FLAG_ENCODE_HIGH</constant>, + <constant>FILTER_FLAG_ENCODE_AMP</constant> + </entry> + <entry>Do nothing, optionally strip or encode special characters.</entry> + </row> + <row> + <entry><constant>FILTER_SANITIZE_EMAIL</constant></entry> + <entry>"email"</entry> + <entry></entry> + <entry></entry> + <entry> + Remove all characters except letters, digits and + <literal>!#$%&'*+-/=?^_`{|}~@.[]</literal>. + </entry> + </row> + <row> + <entry><constant>FILTER_SANITIZE_URL</constant></entry> + <entry>"url"</entry> + <entry></entry> + <entry></entry> + <entry> + Remove all characters except letters, digits and + <literal>$-_.+!*'(),{}|\\^~[]`<>#%";/?:@&=</literal>. + </entry> + </row> + <row> + <entry><constant>FILTER_SANITIZE_NUMBER_INT</constant></entry> + <entry>"number_int"</entry> + <entry></entry> + <entry></entry> + <entry> + Remove all characters except digits and <literal>+-</literal>. + </entry> + </row> + <row> + <entry><constant>FILTER_SANITIZE_NUMBER_FLOAT</constant></entry> + <entry>"number_float"</entry> + <entry></entry> + <entry> + <constant>FILTER_FLAG_ALLOW_FRACTION</constant>, + <constant>FILTER_FLAG_ALLOW_THOUSAND</constant>, + <constant>FILTER_FLAG_ALLOW_SCIENTIFIC</constant> + </entry> + <entry> + Remove all characters except digits, <literal>+-</literal> and + optionally <literal>.,eE</literal>. + </entry> + </row> + <row> + <entry><constant>FILTER_SANITIZE_MAGIC_QUOTES</constant></entry> + <entry>"magic_quotes"</entry> + <entry></entry> + <entry></entry> + <entry>Apply <function>addslashes</function>.</entry> + </row> + + <row> + <entry><constant>FILTER_CALLBACK</constant></entry> + <entry>"callback"</entry> + <entry><type>callback</type> function or method</entry> + <entry></entry> + <entry>Call user-defined function to filter data.</entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </preface> + + &reference.filter.setup; + &reference.filter.constants; + &reference.filter.reference; + +</book> + +<!-- 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 +--> + http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filter/setup.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc/en/reference/filter/setup.xml diff -u /dev/null phpdoc/en/reference/filter/setup.xml:1.2 --- /dev/null Sat Dec 22 00:38:47 2007 +++ phpdoc/en/reference/filter/setup.xml Sat Dec 22 00:38:47 2007 @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> + +<chapter xml:id="filter.setup"> + &reftitle.setup; + + <section xml:id="filter.requirements"> + &reftitle.required; + &no.requirement; + </section> + + &reference.filter.configure; + + &reference.filter.ini; + + <section xml:id="filter.resources"> + &reftitle.resources; + &no.resource; + </section> + +</chapter> + +<!-- 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 +--> + http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filter/constants.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/filter/constants.xml diff -u phpdoc/en/reference/filter/constants.xml:1.4 phpdoc/en/reference/filter/constants.xml:1.5 --- phpdoc/en/reference/filter/constants.xml:1.4 Wed Jun 20 22:24:28 2007 +++ phpdoc/en/reference/filter/constants.xml Sat Dec 22 00:38:47 2007 @@ -1,7 +1,7 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. --> -<section xml:id="filter.constants" xmlns="http://docbook.org/ns/docbook"> +<appendix xml:id="filter.constants" xmlns="http://docbook.org/ns/docbook"> &reftitle.constants; &extension.constants; <variablelist> @@ -570,7 +570,7 @@ </listitem> </varlistentry> </variablelist> -</section> +</appendix> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filter/reference.xml?r1=1.14&r2=1.15&diff_format=u Index: phpdoc/en/reference/filter/reference.xml diff -u phpdoc/en/reference/filter/reference.xml:1.14 phpdoc/en/reference/filter/reference.xml:1.15 --- phpdoc/en/reference/filter/reference.xml:1.14 Mon Dec 10 17:06:03 2007 +++ phpdoc/en/reference/filter/reference.xml Sat Dec 22 00:38:47 2007 @@ -1,264 +1,11 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> -<!-- Purpose: basic.vartype --> -<!-- Membership: pecl --> -<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. --> -<reference xml:id="ref.filter" xmlns="http://docbook.org/ns/docbook"> - <title>Filter Functions</title> - <titleabbrev>Filter</titleabbrev> - - <partintro> - <section xml:id="filter.intro"> - &reftitle.intro; - <para> - This extension serves to validate and filter data coming from some insecure - source, such as user input. - </para> - <para> - The following filters currently exist; be sure to read the - <link linkend="filter.constants">Filter Constants</link> section - for information that describes the behavior of each constant: - <table> - <title>Existing filters</title> - <tgroup cols="5"> - <thead> - <row> - <entry>ID</entry> - <entry>Name</entry> - <entry>Options</entry> - <entry>Flags</entry> - <entry>Description</entry> - </row> - </thead> - <tbody> - <row> - <entry><constant>FILTER_VALIDATE_INT</constant></entry> - <entry>"int"</entry> - <entry> - <parameter>min_range</parameter>, - <parameter>max_range</parameter> - </entry> - <entry> - <constant>FILTER_FLAG_ALLOW_OCTAL</constant>, - <constant>FILTER_FLAG_ALLOW_HEX</constant> - </entry> - <entry>Validates value as integer, optionally from the specified range.</entry> - </row> - <row> - <entry><constant>FILTER_VALIDATE_BOOLEAN</constant></entry> - <entry>"boolean"</entry> - <entry></entry> - <entry> - <constant>FILTER_NULL_ON_FAILURE</constant> - </entry> - <entry> - <para> - Returns &true; for "1", "true", "on" and "yes". - Returns &false; otherwise. - </para> - <para> - If <constant>FILTER_NULL_ON_FAILURE</constant> is set, &false; is - returned only for "0", "false", "off", "no", and "", and - &null; is returned for all non-boolean values. - </para> - </entry> - </row> - <row> - <entry><constant>FILTER_VALIDATE_FLOAT</constant></entry> - <entry>"float"</entry> - <entry> - <parameter>decimal</parameter> - </entry> - <entry> - <constant>FILTER_FLAG_ALLOW_THOUSAND</constant> - </entry> - <entry>Validates value as float.</entry> - </row> - - <row> - <entry><constant>FILTER_VALIDATE_REGEXP</constant></entry> - <entry>"validate_regexp"</entry> - <entry> - <parameter>regexp</parameter> - </entry> - <entry></entry> - <entry> - Validates value against <parameter>regexp</parameter>, a - <link linkend="ref.pcre">Perl-compatible</link> regular expression. - </entry> - </row> - <row> - <entry><constant>FILTER_VALIDATE_URL</constant></entry> - <entry>"validate_url"</entry> - <entry></entry> - <entry> - <constant>FILTER_FLAG_PATH_REQUIRED</constant>, - <constant>FILTER_FLAG_QUERY_REQUIRED</constant> - </entry> - <entry>Validates value as URL, optionally with required components.</entry> - </row> - <row> - <entry><constant>FILTER_VALIDATE_EMAIL</constant></entry> - <entry>"validate_email"</entry> - <entry></entry> - <entry></entry> - <entry>Validates value as e-mail.</entry> - </row> - <row> - <entry><constant>FILTER_VALIDATE_IP</constant></entry> - <entry>"validate_ip"</entry> - <entry></entry> - <entry> - <constant>FILTER_FLAG_IPV4</constant>, - <constant>FILTER_FLAG_IPV6</constant>, - <constant>FILTER_FLAG_NO_PRIV_RANGE</constant>, - <constant>FILTER_FLAG_NO_RES_RANGE</constant> - </entry> - <entry> - Validates value as IP address, optionally only IPv4 or IPv6 or not - from private or reserved ranges. - </entry> - </row> - - <row> - <entry><constant>FILTER_SANITIZE_STRING</constant></entry> - <entry>"string"</entry> - <entry></entry> - <entry> - <constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant>, - <constant>FILTER_FLAG_STRIP_LOW</constant>, - <constant>FILTER_FLAG_STRIP_HIGH</constant>, - <constant>FILTER_FLAG_ENCODE_LOW</constant>, - <constant>FILTER_FLAG_ENCODE_HIGH</constant>, - <constant>FILTER_FLAG_ENCODE_AMP</constant> - </entry> - <entry>Strip tags, optionally strip or encode special characters.</entry> - </row> - <row> - <entry><constant>FILTER_SANITIZE_STRIPPED</constant></entry> - <entry>"stripped"</entry> - <entry></entry> - <entry></entry> - <entry>Alias of "string" filter.</entry> - </row> - <row> - <entry><constant>FILTER_SANITIZE_ENCODED</constant></entry> - <entry>"encoded"</entry> - <entry></entry> - <entry> - <constant>FILTER_FLAG_STRIP_LOW</constant>, - <constant>FILTER_FLAG_STRIP_HIGH</constant>, - <constant>FILTER_FLAG_ENCODE_LOW</constant>, - <constant>FILTER_FLAG_ENCODE_HIGH</constant> - </entry> - <entry>URL-encode string, optionally strip or encode special characters.</entry> - </row> - <row> - <entry><constant>FILTER_SANITIZE_SPECIAL_CHARS</constant></entry> - <entry>"special_chars"</entry> - <entry></entry> - <entry> - <constant>FILTER_FLAG_STRIP_LOW</constant>, - <constant>FILTER_FLAG_STRIP_HIGH</constant>, - <constant>FILTER_FLAG_ENCODE_HIGH</constant> - </entry> - <entry> - HTML-escape <literal>'"<>&</literal> and characters with - ASCII value less than 32, optionally strip or encode other special - characters. - </entry> - </row> - <row> - <entry><constant>FILTER_UNSAFE_RAW</constant></entry> - <entry>"unsafe_raw"</entry> - <entry></entry> - <entry> - <constant>FILTER_FLAG_STRIP_LOW</constant>, - <constant>FILTER_FLAG_STRIP_HIGH</constant>, - <constant>FILTER_FLAG_ENCODE_LOW</constant>, - <constant>FILTER_FLAG_ENCODE_HIGH</constant>, - <constant>FILTER_FLAG_ENCODE_AMP</constant> - </entry> - <entry>Do nothing, optionally strip or encode special characters.</entry> - </row> - <row> - <entry><constant>FILTER_SANITIZE_EMAIL</constant></entry> - <entry>"email"</entry> - <entry></entry> - <entry></entry> - <entry> - Remove all characters except letters, digits and - <literal>!#$%&'*+-/=?^_`{|}~@.[]</literal>. - </entry> - </row> - <row> - <entry><constant>FILTER_SANITIZE_URL</constant></entry> - <entry>"url"</entry> - <entry></entry> - <entry></entry> - <entry> - Remove all characters except letters, digits and - <literal>$-_.+!*'(),{}|\\^~[]`<>#%";/?:@&=</literal>. - </entry> - </row> - <row> - <entry><constant>FILTER_SANITIZE_NUMBER_INT</constant></entry> - <entry>"number_int"</entry> - <entry></entry> - <entry></entry> - <entry> - Remove all characters except digits, plus and minus sign. - </entry> - </row> - <row> - <entry><constant>FILTER_SANITIZE_NUMBER_FLOAT</constant></entry> - <entry>"number_float"</entry> - <entry></entry> - <entry> - <constant>FILTER_FLAG_ALLOW_FRACTION</constant>, - <constant>FILTER_FLAG_ALLOW_THOUSAND</constant>, - <constant>FILTER_FLAG_ALLOW_SCIENTIFIC</constant> - </entry> - <entry> - Remove all characters except digits, <literal>+-</literal> and - optionally <literal>.,eE</literal>. - </entry> - </row> - <row> - <entry><constant>FILTER_SANITIZE_MAGIC_QUOTES</constant></entry> - <entry>"magic_quotes"</entry> - <entry></entry> - <entry></entry> - <entry>Apply <function>addslashes</function>.</entry> - </row> +<!-- $Revision: 1.15 $ --> - <row> - <entry><constant>FILTER_CALLBACK</constant></entry> - <entry>"callback"</entry> - <entry><type>callback</type> function or method</entry> - <entry></entry> - <entry>Call user-defined function to filter data.</entry> - </row> - </tbody> - </tgroup> - </table> - </para> - </section> - <section xml:id="filter.requirements"> - &reftitle.required; - &no.requirement; - </section> - - &reference.filter.configure; - &reference.filter.ini; +<reference xml:id="ref.filter" xmlns="http://docbook.org/ns/docbook"> + <title>Filter &Functions;</title> - <section xml:id="filter.resources"> - &reftitle.resources; - &no.resource; - </section> - &reference.filter.constants; - </partintro> &reference.filter.entities.functions; + </reference> <!-- Keep this comment at the end of the file @@ -281,3 +28,4 @@ vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> + http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filter/functions/filter-input-array.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/filter/functions/filter-input-array.xml diff -u phpdoc/en/reference/filter/functions/filter-input-array.xml:1.6 phpdoc/en/reference/filter/functions/filter-input-array.xml:1.7 --- phpdoc/en/reference/filter/functions/filter-input-array.xml:1.6 Mon Aug 20 14:46:08 2007 +++ phpdoc/en/reference/filter/functions/filter-input-array.xml Sat Dec 22 00:38:47 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry xml:id="function.filter-input-array" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>filter_input_array</refname> @@ -48,7 +48,7 @@ </para> <para> This parameter can be also an integer holding a <link - linkend="filter.intro">filter constant</link>. Then all values in the + linkend="filter.constants">filter constant</link>. Then all values in the input array are filtered by this filter. </para> </listitem> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filter/functions/filter-var-array.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/filter/functions/filter-var-array.xml diff -u phpdoc/en/reference/filter/functions/filter-var-array.xml:1.7 phpdoc/en/reference/filter/functions/filter-var-array.xml:1.8 --- phpdoc/en/reference/filter/functions/filter-var-array.xml:1.7 Wed Jun 20 22:24:28 2007 +++ phpdoc/en/reference/filter/functions/filter-var-array.xml Sat Dec 22 00:38:47 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <refentry xml:id="function.filter-var-array" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>filter_var_array</refname> @@ -45,7 +45,7 @@ </para> <para> This parameter can be also an integer holding a <link - linkend="filter.intro">filter constant</link>. Then all values in the + linkend="filter.constants">filter constant</link>. Then all values in the input array are filtered by this filter. </para> </listitem>
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filter/book.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc/en/reference/filter/book.xml diff -u /dev/null phpdoc/en/reference/filter/book.xml:1.2 --- /dev/null Sat Dec 22 00:38:47 2007 +++ phpdoc/en/reference/filter/book.xml Sat Dec 22 00:38:47 2007 @@ -0,0 +1,272 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- Purpose: basic.vartype --> + +<book xml:id="book.filter" xmlns="http://docbook.org/ns/docbook"> + <title>Filter Functions</title> + <titleabbrev>Filter</titleabbrev> + + <preface xml:id="intro.filter"> + &reftitle.intro; + <para> + This extension serves to validate and filter data coming from some insecure + source, such as user input. + </para> + <para> + The following filters currently exist; be sure to read the + <link linkend="filter.constants">Filter Constants</link> section + for information that describes the behavior of each constant: + <table> + <title>Existing filters</title> + <tgroup cols="5"> + <thead> + <row> + <entry>ID</entry> + <entry>Name</entry> + <entry>Options</entry> + <entry>Flags</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry><constant>FILTER_VALIDATE_INT</constant></entry> + <entry>"int"</entry> + <entry> + <parameter>min_range</parameter>, + <parameter>max_range</parameter> + </entry> + <entry> + <constant>FILTER_FLAG_ALLOW_OCTAL</constant>, + <constant>FILTER_FLAG_ALLOW_HEX</constant> + </entry> + <entry>Validates value as integer, optionally from the specified range.</entry> + </row> + <row> + <entry><constant>FILTER_VALIDATE_BOOLEAN</constant></entry> + <entry>"boolean"</entry> + <entry></entry> + <entry> + <constant>FILTER_NULL_ON_FAILURE</constant> + </entry> + <entry> + <para> + Returns &true; for "1", "true", "on" and "yes". + Returns &false; otherwise. + </para> + <para> + If <constant>FILTER_NULL_ON_FAILURE</constant> is set, &false; is + returned only for "0", "false", "off", "no", and "", and + &null; is returned for all non-boolean values. + </para> + </entry> + </row> + <row> + <entry><constant>FILTER_VALIDATE_FLOAT</constant></entry> + <entry>"float"</entry> + <entry> + <parameter>decimal</parameter> + </entry> + <entry> + <constant>FILTER_FLAG_ALLOW_THOUSAND</constant> + </entry> + <entry>Validates value as float.</entry> + </row> + + <row> + <entry><constant>FILTER_VALIDATE_REGEXP</constant></entry> + <entry>"validate_regexp"</entry> + <entry> + <parameter>regexp</parameter> + </entry> + <entry></entry> + <entry> + Validates value against <parameter>regexp</parameter>, a + <link linkend="book.pcre">Perl-compatible</link> regular expression. + </entry> + </row> + <row> + <entry><constant>FILTER_VALIDATE_URL</constant></entry> + <entry>"validate_url"</entry> + <entry></entry> + <entry> + <constant>FILTER_FLAG_PATH_REQUIRED</constant>, + <constant>FILTER_FLAG_QUERY_REQUIRED</constant> + </entry> + <entry>Validates value as URL, optionally with required components.</entry> + </row> + <row> + <entry><constant>FILTER_VALIDATE_EMAIL</constant></entry> + <entry>"validate_email"</entry> + <entry></entry> + <entry></entry> + <entry>Validates value as e-mail.</entry> + </row> + <row> + <entry><constant>FILTER_VALIDATE_IP</constant></entry> + <entry>"validate_ip"</entry> + <entry></entry> + <entry> + <constant>FILTER_FLAG_IPV4</constant>, + <constant>FILTER_FLAG_IPV6</constant>, + <constant>FILTER_FLAG_NO_PRIV_RANGE</constant>, + <constant>FILTER_FLAG_NO_RES_RANGE</constant> + </entry> + <entry> + Validates value as IP address, optionally only IPv4 or IPv6 or not + from private or reserved ranges. + </entry> + </row> + + <row> + <entry><constant>FILTER_SANITIZE_STRING</constant></entry> + <entry>"string"</entry> + <entry></entry> + <entry> + <constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant>, + <constant>FILTER_FLAG_STRIP_LOW</constant>, + <constant>FILTER_FLAG_STRIP_HIGH</constant>, + <constant>FILTER_FLAG_ENCODE_LOW</constant>, + <constant>FILTER_FLAG_ENCODE_HIGH</constant>, + <constant>FILTER_FLAG_ENCODE_AMP</constant> + </entry> + <entry>Strip tags, optionally strip or encode special characters.</entry> + </row> + <row> + <entry><constant>FILTER_SANITIZE_STRIPPED</constant></entry> + <entry>"stripped"</entry> + <entry></entry> + <entry></entry> + <entry>Alias of "string" filter.</entry> + </row> + <row> + <entry><constant>FILTER_SANITIZE_ENCODED</constant></entry> + <entry>"encoded"</entry> + <entry></entry> + <entry> + <constant>FILTER_FLAG_STRIP_LOW</constant>, + <constant>FILTER_FLAG_STRIP_HIGH</constant>, + <constant>FILTER_FLAG_ENCODE_LOW</constant>, + <constant>FILTER_FLAG_ENCODE_HIGH</constant> + </entry> + <entry>URL-encode string, optionally strip or encode special characters.</entry> + </row> + <row> + <entry><constant>FILTER_SANITIZE_SPECIAL_CHARS</constant></entry> + <entry>"special_chars"</entry> + <entry></entry> + <entry> + <constant>FILTER_FLAG_STRIP_LOW</constant>, + <constant>FILTER_FLAG_STRIP_HIGH</constant>, + <constant>FILTER_FLAG_ENCODE_HIGH</constant> + </entry> + <entry> + HTML-escape <literal>'"<>&</literal> and characters with + ASCII value less than 32, optionally strip or encode other special + characters. + </entry> + </row> + <row> + <entry><constant>FILTER_UNSAFE_RAW</constant></entry> + <entry>"unsafe_raw"</entry> + <entry></entry> + <entry> + <constant>FILTER_FLAG_STRIP_LOW</constant>, + <constant>FILTER_FLAG_STRIP_HIGH</constant>, + <constant>FILTER_FLAG_ENCODE_LOW</constant>, + <constant>FILTER_FLAG_ENCODE_HIGH</constant>, + <constant>FILTER_FLAG_ENCODE_AMP</constant> + </entry> + <entry>Do nothing, optionally strip or encode special characters.</entry> + </row> + <row> + <entry><constant>FILTER_SANITIZE_EMAIL</constant></entry> + <entry>"email"</entry> + <entry></entry> + <entry></entry> + <entry> + Remove all characters except letters, digits and + <literal>!#$%&'*+-/=?^_`{|}~@.[]</literal>. + </entry> + </row> + <row> + <entry><constant>FILTER_SANITIZE_URL</constant></entry> + <entry>"url"</entry> + <entry></entry> + <entry></entry> + <entry> + Remove all characters except letters, digits and + <literal>$-_.+!*'(),{}|\\^~[]`<>#%";/?:@&=</literal>. + </entry> + </row> + <row> + <entry><constant>FILTER_SANITIZE_NUMBER_INT</constant></entry> + <entry>"number_int"</entry> + <entry></entry> + <entry></entry> + <entry> + Remove all characters except digits and <literal>+-</literal>. + </entry> + </row> + <row> + <entry><constant>FILTER_SANITIZE_NUMBER_FLOAT</constant></entry> + <entry>"number_float"</entry> + <entry></entry> + <entry> + <constant>FILTER_FLAG_ALLOW_FRACTION</constant>, + <constant>FILTER_FLAG_ALLOW_THOUSAND</constant>, + <constant>FILTER_FLAG_ALLOW_SCIENTIFIC</constant> + </entry> + <entry> + Remove all characters except digits, <literal>+-</literal> and + optionally <literal>.,eE</literal>. + </entry> + </row> + <row> + <entry><constant>FILTER_SANITIZE_MAGIC_QUOTES</constant></entry> + <entry>"magic_quotes"</entry> + <entry></entry> + <entry></entry> + <entry>Apply <function>addslashes</function>.</entry> + </row> + + <row> + <entry><constant>FILTER_CALLBACK</constant></entry> + <entry>"callback"</entry> + <entry><type>callback</type> function or method</entry> + <entry></entry> + <entry>Call user-defined function to filter data.</entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </preface> + + &reference.filter.setup; + &reference.filter.constants; + &reference.filter.reference; + +</book> + +<!-- 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 +--> + http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filter/setup.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc/en/reference/filter/setup.xml diff -u /dev/null phpdoc/en/reference/filter/setup.xml:1.2 --- /dev/null Sat Dec 22 00:38:47 2007 +++ phpdoc/en/reference/filter/setup.xml Sat Dec 22 00:38:47 2007 @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> + +<chapter xml:id="filter.setup"> + &reftitle.setup; + + <section xml:id="filter.requirements"> + &reftitle.required; + &no.requirement; + </section> + + &reference.filter.configure; + + &reference.filter.ini; + + <section xml:id="filter.resources"> + &reftitle.resources; + &no.resource; + </section> + +</chapter> + +<!-- 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 +--> + http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filter/constants.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/filter/constants.xml diff -u phpdoc/en/reference/filter/constants.xml:1.4 phpdoc/en/reference/filter/constants.xml:1.5 --- phpdoc/en/reference/filter/constants.xml:1.4 Wed Jun 20 22:24:28 2007 +++ phpdoc/en/reference/filter/constants.xml Sat Dec 22 00:38:47 2007 @@ -1,7 +1,7 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. --> -<section xml:id="filter.constants" xmlns="http://docbook.org/ns/docbook"> +<appendix xml:id="filter.constants" xmlns="http://docbook.org/ns/docbook"> &reftitle.constants; &extension.constants; <variablelist> @@ -570,7 +570,7 @@ </listitem> </varlistentry> </variablelist> -</section> +</appendix> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filter/reference.xml?r1=1.14&r2=1.15&diff_format=u Index: phpdoc/en/reference/filter/reference.xml diff -u phpdoc/en/reference/filter/reference.xml:1.14 phpdoc/en/reference/filter/reference.xml:1.15 --- phpdoc/en/reference/filter/reference.xml:1.14 Mon Dec 10 17:06:03 2007 +++ phpdoc/en/reference/filter/reference.xml Sat Dec 22 00:38:47 2007 @@ -1,264 +1,11 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> -<!-- Purpose: basic.vartype --> -<!-- Membership: pecl --> -<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. --> -<reference xml:id="ref.filter" xmlns="http://docbook.org/ns/docbook"> - <title>Filter Functions</title> - <titleabbrev>Filter</titleabbrev> - - <partintro> - <section xml:id="filter.intro"> - &reftitle.intro; - <para> - This extension serves to validate and filter data coming from some insecure - source, such as user input. - </para> - <para> - The following filters currently exist; be sure to read the - <link linkend="filter.constants">Filter Constants</link> section - for information that describes the behavior of each constant: - <table> - <title>Existing filters</title> - <tgroup cols="5"> - <thead> - <row> - <entry>ID</entry> - <entry>Name</entry> - <entry>Options</entry> - <entry>Flags</entry> - <entry>Description</entry> - </row> - </thead> - <tbody> - <row> - <entry><constant>FILTER_VALIDATE_INT</constant></entry> - <entry>"int"</entry> - <entry> - <parameter>min_range</parameter>, - <parameter>max_range</parameter> - </entry> - <entry> - <constant>FILTER_FLAG_ALLOW_OCTAL</constant>, - <constant>FILTER_FLAG_ALLOW_HEX</constant> - </entry> - <entry>Validates value as integer, optionally from the specified range.</entry> - </row> - <row> - <entry><constant>FILTER_VALIDATE_BOOLEAN</constant></entry> - <entry>"boolean"</entry> - <entry></entry> - <entry> - <constant>FILTER_NULL_ON_FAILURE</constant> - </entry> - <entry> - <para> - Returns &true; for "1", "true", "on" and "yes". - Returns &false; otherwise. - </para> - <para> - If <constant>FILTER_NULL_ON_FAILURE</constant> is set, &false; is - returned only for "0", "false", "off", "no", and "", and - &null; is returned for all non-boolean values. - </para> - </entry> - </row> - <row> - <entry><constant>FILTER_VALIDATE_FLOAT</constant></entry> - <entry>"float"</entry> - <entry> - <parameter>decimal</parameter> - </entry> - <entry> - <constant>FILTER_FLAG_ALLOW_THOUSAND</constant> - </entry> - <entry>Validates value as float.</entry> - </row> - - <row> - <entry><constant>FILTER_VALIDATE_REGEXP</constant></entry> - <entry>"validate_regexp"</entry> - <entry> - <parameter>regexp</parameter> - </entry> - <entry></entry> - <entry> - Validates value against <parameter>regexp</parameter>, a - <link linkend="ref.pcre">Perl-compatible</link> regular expression. - </entry> - </row> - <row> - <entry><constant>FILTER_VALIDATE_URL</constant></entry> - <entry>"validate_url"</entry> - <entry></entry> - <entry> - <constant>FILTER_FLAG_PATH_REQUIRED</constant>, - <constant>FILTER_FLAG_QUERY_REQUIRED</constant> - </entry> - <entry>Validates value as URL, optionally with required components.</entry> - </row> - <row> - <entry><constant>FILTER_VALIDATE_EMAIL</constant></entry> - <entry>"validate_email"</entry> - <entry></entry> - <entry></entry> - <entry>Validates value as e-mail.</entry> - </row> - <row> - <entry><constant>FILTER_VALIDATE_IP</constant></entry> - <entry>"validate_ip"</entry> - <entry></entry> - <entry> - <constant>FILTER_FLAG_IPV4</constant>, - <constant>FILTER_FLAG_IPV6</constant>, - <constant>FILTER_FLAG_NO_PRIV_RANGE</constant>, - <constant>FILTER_FLAG_NO_RES_RANGE</constant> - </entry> - <entry> - Validates value as IP address, optionally only IPv4 or IPv6 or not - from private or reserved ranges. - </entry> - </row> - - <row> - <entry><constant>FILTER_SANITIZE_STRING</constant></entry> - <entry>"string"</entry> - <entry></entry> - <entry> - <constant>FILTER_FLAG_NO_ENCODE_QUOTES</constant>, - <constant>FILTER_FLAG_STRIP_LOW</constant>, - <constant>FILTER_FLAG_STRIP_HIGH</constant>, - <constant>FILTER_FLAG_ENCODE_LOW</constant>, - <constant>FILTER_FLAG_ENCODE_HIGH</constant>, - <constant>FILTER_FLAG_ENCODE_AMP</constant> - </entry> - <entry>Strip tags, optionally strip or encode special characters.</entry> - </row> - <row> - <entry><constant>FILTER_SANITIZE_STRIPPED</constant></entry> - <entry>"stripped"</entry> - <entry></entry> - <entry></entry> - <entry>Alias of "string" filter.</entry> - </row> - <row> - <entry><constant>FILTER_SANITIZE_ENCODED</constant></entry> - <entry>"encoded"</entry> - <entry></entry> - <entry> - <constant>FILTER_FLAG_STRIP_LOW</constant>, - <constant>FILTER_FLAG_STRIP_HIGH</constant>, - <constant>FILTER_FLAG_ENCODE_LOW</constant>, - <constant>FILTER_FLAG_ENCODE_HIGH</constant> - </entry> - <entry>URL-encode string, optionally strip or encode special characters.</entry> - </row> - <row> - <entry><constant>FILTER_SANITIZE_SPECIAL_CHARS</constant></entry> - <entry>"special_chars"</entry> - <entry></entry> - <entry> - <constant>FILTER_FLAG_STRIP_LOW</constant>, - <constant>FILTER_FLAG_STRIP_HIGH</constant>, - <constant>FILTER_FLAG_ENCODE_HIGH</constant> - </entry> - <entry> - HTML-escape <literal>'"<>&</literal> and characters with - ASCII value less than 32, optionally strip or encode other special - characters. - </entry> - </row> - <row> - <entry><constant>FILTER_UNSAFE_RAW</constant></entry> - <entry>"unsafe_raw"</entry> - <entry></entry> - <entry> - <constant>FILTER_FLAG_STRIP_LOW</constant>, - <constant>FILTER_FLAG_STRIP_HIGH</constant>, - <constant>FILTER_FLAG_ENCODE_LOW</constant>, - <constant>FILTER_FLAG_ENCODE_HIGH</constant>, - <constant>FILTER_FLAG_ENCODE_AMP</constant> - </entry> - <entry>Do nothing, optionally strip or encode special characters.</entry> - </row> - <row> - <entry><constant>FILTER_SANITIZE_EMAIL</constant></entry> - <entry>"email"</entry> - <entry></entry> - <entry></entry> - <entry> - Remove all characters except letters, digits and - <literal>!#$%&'*+-/=?^_`{|}~@.[]</literal>. - </entry> - </row> - <row> - <entry><constant>FILTER_SANITIZE_URL</constant></entry> - <entry>"url"</entry> - <entry></entry> - <entry></entry> - <entry> - Remove all characters except letters, digits and - <literal>$-_.+!*'(),{}|\\^~[]`<>#%";/?:@&=</literal>. - </entry> - </row> - <row> - <entry><constant>FILTER_SANITIZE_NUMBER_INT</constant></entry> - <entry>"number_int"</entry> - <entry></entry> - <entry></entry> - <entry> - Remove all characters except digits, plus and minus sign. - </entry> - </row> - <row> - <entry><constant>FILTER_SANITIZE_NUMBER_FLOAT</constant></entry> - <entry>"number_float"</entry> - <entry></entry> - <entry> - <constant>FILTER_FLAG_ALLOW_FRACTION</constant>, - <constant>FILTER_FLAG_ALLOW_THOUSAND</constant>, - <constant>FILTER_FLAG_ALLOW_SCIENTIFIC</constant> - </entry> - <entry> - Remove all characters except digits, <literal>+-</literal> and - optionally <literal>.,eE</literal>. - </entry> - </row> - <row> - <entry><constant>FILTER_SANITIZE_MAGIC_QUOTES</constant></entry> - <entry>"magic_quotes"</entry> - <entry></entry> - <entry></entry> - <entry>Apply <function>addslashes</function>.</entry> - </row> +<!-- $Revision: 1.15 $ --> - <row> - <entry><constant>FILTER_CALLBACK</constant></entry> - <entry>"callback"</entry> - <entry><type>callback</type> function or method</entry> - <entry></entry> - <entry>Call user-defined function to filter data.</entry> - </row> - </tbody> - </tgroup> - </table> - </para> - </section> - <section xml:id="filter.requirements"> - &reftitle.required; - &no.requirement; - </section> - - &reference.filter.configure; - &reference.filter.ini; +<reference xml:id="ref.filter" xmlns="http://docbook.org/ns/docbook"> + <title>Filter &Functions;</title> - <section xml:id="filter.resources"> - &reftitle.resources; - &no.resource; - </section> - &reference.filter.constants; - </partintro> &reference.filter.entities.functions; + </reference> <!-- Keep this comment at the end of the file @@ -281,3 +28,4 @@ vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> + http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filter/functions/filter-input-array.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/filter/functions/filter-input-array.xml diff -u phpdoc/en/reference/filter/functions/filter-input-array.xml:1.6 phpdoc/en/reference/filter/functions/filter-input-array.xml:1.7 --- phpdoc/en/reference/filter/functions/filter-input-array.xml:1.6 Mon Aug 20 14:46:08 2007 +++ phpdoc/en/reference/filter/functions/filter-input-array.xml Sat Dec 22 00:38:47 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry xml:id="function.filter-input-array" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>filter_input_array</refname> @@ -48,7 +48,7 @@ </para> <para> This parameter can be also an integer holding a <link - linkend="filter.intro">filter constant</link>. Then all values in the + linkend="filter.constants">filter constant</link>. Then all values in the input array are filtered by this filter. </para> </listitem> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filter/functions/filter-var-array.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/filter/functions/filter-var-array.xml diff -u phpdoc/en/reference/filter/functions/filter-var-array.xml:1.7 phpdoc/en/reference/filter/functions/filter-var-array.xml:1.8 --- phpdoc/en/reference/filter/functions/filter-var-array.xml:1.7 Wed Jun 20 22:24:28 2007 +++ phpdoc/en/reference/filter/functions/filter-var-array.xml Sat Dec 22 00:38:47 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <refentry xml:id="function.filter-var-array" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>filter_var_array</refname> @@ -45,7 +45,7 @@ </para> <para> This parameter can be also an integer holding a <link - linkend="filter.intro">filter constant</link>. Then all values in the + linkend="filter.constants">filter constant</link>. Then all values in the input array are filtered by this filter. </para> </listitem>