classAudit.html 18.1 KB
Newer Older
Mindiell's avatar
Mindiell committed
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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
<!-- HTML header for doxygen 1.8.5-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>Fat-Free Framework: Audit Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Fat-Free Framework
   &#160;<span id="projectnumber">3.3.0</span>
   &#160;<span class="menu"><a href="index.html">Overview</a> <a href="annotated.html">Class List</a> <a href="hierarchy.html">Hierarchy</a></span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.7 -->
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classAudit-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Audit Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Data validator.  
 <a href="classAudit.html#details">More...</a></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for Audit:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
 <div class="center">
  <img src="classAudit.png" usemap="#Audit_map" alt=""/>
  <map id="Audit_map" name="Audit_map">
<area href="classPrefab.html" title="Factory class for single-instance objects. " alt="Prefab" shape="rect" coords="0,0,50,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab336b765e98d6370c23174a4e8fdcabb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#ab336b765e98d6370c23174a4e8fdcabb">url</a> ($str)</td></tr>
<tr class="separator:ab336b765e98d6370c23174a4e8fdcabb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02ac097b7d0aecabd3240caa9f0da721"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#a02ac097b7d0aecabd3240caa9f0da721">email</a> ($str, $mx=TRUE)</td></tr>
<tr class="separator:a02ac097b7d0aecabd3240caa9f0da721"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad212e486cbfe86be9f5c11ad3910b815"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#ad212e486cbfe86be9f5c11ad3910b815">ipv4</a> ($addr)</td></tr>
<tr class="separator:ad212e486cbfe86be9f5c11ad3910b815"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab063234ba71915d238a52dc95a00d329"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#ab063234ba71915d238a52dc95a00d329">ipv6</a> ($addr)</td></tr>
<tr class="separator:ab063234ba71915d238a52dc95a00d329"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3a7ec3b4e409b9840568c984b210c8c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#ad3a7ec3b4e409b9840568c984b210c8c">isprivate</a> ($addr)</td></tr>
<tr class="separator:ad3a7ec3b4e409b9840568c984b210c8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae495176807f8eb67bf0594ed4093b790"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#ae495176807f8eb67bf0594ed4093b790">isreserved</a> ($addr)</td></tr>
<tr class="separator:ae495176807f8eb67bf0594ed4093b790"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca7caf71d2616e348202b3d956d6fa90"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#aca7caf71d2616e348202b3d956d6fa90">ispublic</a> ($addr)</td></tr>
<tr class="separator:aca7caf71d2616e348202b3d956d6fa90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67dde47e31fc8735a5eee934025bacb1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#a67dde47e31fc8735a5eee934025bacb1">isdesktop</a> ()</td></tr>
<tr class="separator:a67dde47e31fc8735a5eee934025bacb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa816122125e18fdd26cd2a442eab7d26"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#aa816122125e18fdd26cd2a442eab7d26">ismobile</a> ()</td></tr>
<tr class="separator:aa816122125e18fdd26cd2a442eab7d26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4eb6504047ce071cc445eba3d96b4f6f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#a4eb6504047ce071cc445eba3d96b4f6f">isbot</a> ()</td></tr>
<tr class="separator:a4eb6504047ce071cc445eba3d96b4f6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac0692b7b6ad10d1b24f38acf3c0dc83"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#aac0692b7b6ad10d1b24f38acf3c0dc83">mod10</a> ($id)</td></tr>
<tr class="separator:aac0692b7b6ad10d1b24f38acf3c0dc83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a770cba20e7000564c5fb6b5c11a20b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#a4a770cba20e7000564c5fb6b5c11a20b">card</a> ($id)</td></tr>
<tr class="separator:a4a770cba20e7000564c5fb6b5c11a20b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d749ab3e7722c44f637e531dd896e5d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#a1d749ab3e7722c44f637e531dd896e5d">entropy</a> ($str)</td></tr>
<tr class="separator:a1d749ab3e7722c44f637e531dd896e5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:ac2fe8dda06f93939c5d8a37f08f045fd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac2fe8dda06f93939c5d8a37f08f045fd"></a>
const&#160;</td><td class="memItemRight" valign="bottom"><b>UA_Mobile</b> ='android|blackberry|iphone|ipod|palm|windows\s+ce'</td></tr>
<tr class="separator:ac2fe8dda06f93939c5d8a37f08f045fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d9f7f10576d87fa83158799fddb508d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8d9f7f10576d87fa83158799fddb508d"></a>
const&#160;</td><td class="memItemRight" valign="bottom"><b>UA_Desktop</b> ='bsd|linux|os\s+[x9]|solaris|windows'</td></tr>
<tr class="separator:a8d9f7f10576d87fa83158799fddb508d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05029f6cd6fe435d2c275ebf2c665d61"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a05029f6cd6fe435d2c275ebf2c665d61"></a>
const&#160;</td><td class="memItemRight" valign="bottom"><b>UA_Bot</b> ='bot|crawl|slurp|spider'</td></tr>
<tr class="separator:a05029f6cd6fe435d2c275ebf2c665d61"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_static_methods_classPrefab"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classPrefab')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="classPrefab.html">Prefab</a></td></tr>
<tr class="memitem:a459ac539bc012dbdb77abe0d0ebeba76 inherit pub_static_methods_classPrefab"><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPrefab.html#a459ac539bc012dbdb77abe0d0ebeba76">instance</a> ()</td></tr>
<tr class="separator:a459ac539bc012dbdb77abe0d0ebeba76 inherit pub_static_methods_classPrefab"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Data validator. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a4a770cba20e7000564c5fb6b5c11a20b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::card </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return credit card type if number is valid </p><dl class="section return"><dt>Returns</dt><dd>string|FALSE </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$id</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a02ac097b7d0aecabd3240caa9f0da721"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::email </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$mx</em> = <code>TRUE</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if string is a valid e-mail address; Check DNS MX records if specified </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$str</td><td>string </td></tr>
    <tr><td class="paramname">$mx</td><td>boolean </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1d749ab3e7722c44f637e531dd896e5d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::entropy </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return entropy estimate of a password (NIST 800-63) </p><dl class="section return"><dt>Returns</dt><dd>int|float </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$str</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad212e486cbfe86be9f5c11ad3910b815"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::ipv4 </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if string is a valid IPV4 address </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$addr</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab063234ba71915d238a52dc95a00d329"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::ipv6 </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if string is a valid IPV6 address </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$addr</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a4eb6504047ce071cc445eba3d96b4f6f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::isbot </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if user agent is a Web bot </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>

</div>
</div>
<a class="anchor" id="a67dde47e31fc8735a5eee934025bacb1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::isdesktop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if user agent is a desktop browser </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>

</div>
</div>
<a class="anchor" id="aa816122125e18fdd26cd2a442eab7d26"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::ismobile </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if user agent is a mobile device </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>

</div>
</div>
<a class="anchor" id="ad3a7ec3b4e409b9840568c984b210c8c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::isprivate </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if IP address is within private range </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$addr</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aca7caf71d2616e348202b3d956d6fa90"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::ispublic </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if IP address is neither private nor reserved </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$addr</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae495176807f8eb67bf0594ed4093b790"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::isreserved </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if IP address is within reserved range </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$addr</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aac0692b7b6ad10d1b24f38acf3c0dc83"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::mod10 </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if specified ID has a valid (Luhn) Mod-10 check digit </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$id</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab336b765e98d6370c23174a4e8fdcabb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::url </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if string is a valid URL </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$str</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>audit.php</li>
</ul>
</div><!-- contents -->