Fat-Free Framework
3.1.0 API Reference
|
Audit Class Reference
Data validator. More...
Inheritance diagram for Audit:
Public Member Functions | |
url ($str) | |
email ($str, $mx=TRUE) | |
ipv4 ($addr) | |
ipv6 ($addr) | |
isprivate ($addr) | |
isreserved ($addr) | |
ispublic ($addr) | |
isdesktop () | |
ismobile () | |
isbot () | |
mod10 ($id) | |
card ($id) | |
entropy ($str) | |
Public Attributes | |
const | UA_Mobile ='android|blackberry|iphone|ipod|palm|windows\s+ce' |
const | UA_Desktop ='bsd|linux|os\s+[x9]|solaris|windows' |
const | UA_Bot ='bot|crawl|slurp|spider' |
Additional Inherited Members | |
Static Public Member Functions inherited from Prefab | |
static | instance () |
Detailed Description
Data validator.
Member Function Documentation
Audit::card | ( | $id) |
Return credit card type if number is valid
- Returns
- string|FALSE
- Parameters
-
$id string
Audit::email | ( | $str, | |
$mx = TRUE |
|||
) |
Return TRUE if string is a valid e-mail address; Check DNS MX records if specified
- Returns
- bool
- Parameters
-
$str string $mx boolean
Audit::entropy | ( | $str) |
Return entropy estimate of a password (NIST 800-63)
- Returns
- int
- Parameters
-
$str string
Audit::ipv4 | ( | $addr) |
Return TRUE if string is a valid IPV4 address
- Returns
- bool
- Parameters
-
$addr string
Audit::ipv6 | ( | $addr) |
Return TRUE if string is a valid IPV6 address
- Returns
- bool
- Parameters
-
$addr string
Audit::isbot | ( | ) |
Return TRUE if user agent is a Web bot
- Returns
- bool
Audit::isdesktop | ( | ) |
Return TRUE if user agent is a desktop browser
- Returns
- bool
Audit::ismobile | ( | ) |
Return TRUE if user agent is a mobile device
- Returns
- bool
Audit::isprivate | ( | $addr) |
Return TRUE if IP address is within private range
- Returns
- bool
- Parameters
-
$addr string
Audit::ispublic | ( | $addr) |
Return TRUE if IP address is neither private nor reserved
- Returns
- bool
- Parameters
-
$addr string
Audit::isreserved | ( | $addr) |
Return TRUE if IP address is within reserved range
- Returns
- bool
- Parameters
-
$addr string
Audit::mod10 | ( | $id) |
Return TRUE if specified ID has a valid (Luhn) Mod-10 check digit
- Returns
- bool
- Parameters
-
$id string
Audit::url | ( | $str) |
Return TRUE if string is a valid URL
- Returns
- bool
- Parameters
-
$str string
The documentation for this class was generated from the following file:
- audit.php
Generated on Mon Aug 19 2013 21:27:45 for Fat-Free Framework by 1.8.4