File: reference.xml

package info (click to toggle)
php-doc 20061001-1
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 45,764 kB
  • ctags: 1,611
  • sloc: xml: 502,485; php: 7,645; cpp: 500; makefile: 297; perl: 161; sh: 141; awk: 28
file content (275 lines) | stat: -rw-r--r-- 9,023 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- Purpose: basic.vartype -->
<!-- Membership: pecl -->
<!-- State: experimental -->
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
<reference id="ref.filter">
 <title>Filter Functions</title>
 <titleabbrev>Filter</titleabbrev>

 <partintro>
  <section id="filter.intro">
   &reftitle.intro;
   <para>
    This extension serves for validating and filtering data coming usually
    from some insecure source such as user input.
   </para>
   &warn.experimental;
   <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="4">
      <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></entry>
        <entry>
         Returns &true; for "1", "true", "on" and "yes",
         &false; for "0", "false", "off", "no", and "",
         &null; otherwise.
        </entry>
       </row>
       <row>
        <entry><constant>FILTER_VALIDATE_FLOAT</constant></entry>
        <entry>"float"</entry>
        <entry></entry>
        <entry></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_SCHEME_REQUIRED</constant>,
         <constant>FILTER_FLAG_HOST_REQUIRED</constant>,
         <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>'"&lt;&gt;&amp;</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>!#$%&amp;'*+-/=?^_`{|}~@.[]</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>$-_.+!*'(),{}|\\^~[]`&lt;&gt;#%";/?:@&amp;=</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></entry>
        <entry><type>callback</type> function or method</entry>
        <entry>Call user-defined function to filter data.</entry>
       </row>
      </tbody>
     </tgroup>
    </table>
   </para>
  </section>
  <section id="filter.requirements">
   &reftitle.required;
   &no.requirement;
  </section>

  &reference.filter.configure;
  &reference.filter.ini;

  <section id="filter.resources">
   &reftitle.resources;
   &no.resource;
  </section>
  &reference.filter.constants;
 </partintro>
 &reference.filter.functions;
</reference>

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