Fat-Free Framework: Audit Class Reference

Fat-Free-Framework

Fat-Free Framework  3.1.0 API Reference

Data validator. More...

Inheritance diagram for Audit:
Prefab

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
$idstring
Audit::email (   $str,
  $mx = TRUE 
)

Return TRUE if string is a valid e-mail address; Check DNS MX records if specified

Returns
bool
Parameters
$strstring
$mxboolean
Audit::entropy (   $str)

Return entropy estimate of a password (NIST 800-63)

Returns
int
Parameters
$strstring
Audit::ipv4 (   $addr)

Return TRUE if string is a valid IPV4 address

Returns
bool
Parameters
$addrstring
Audit::ipv6 (   $addr)

Return TRUE if string is a valid IPV6 address

Returns
bool
Parameters
$addrstring
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
$addrstring
Audit::ispublic (   $addr)

Return TRUE if IP address is neither private nor reserved

Returns
bool
Parameters
$addrstring
Audit::isreserved (   $addr)

Return TRUE if IP address is within reserved range

Returns
bool
Parameters
$addrstring
Audit::mod10 (   $id)

Return TRUE if specified ID has a valid (Luhn) Mod-10 check digit

Returns
bool
Parameters
$idstring
Audit::url (   $str)

Return TRUE if string is a valid URL

Returns
bool
Parameters
$strstring

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   doxygen 1.8.4