Class Inspekt

Description

Located in /Inspekt.php (line 90)


	
			
Method Summary
static mixed getAlnum (mixed $value)
static mixed getAlpha (mixed $value)
static mixed getDigits (mixed $value)
static mixed getDir (mixed $value)
static boolean isGreaterThan (mixed $value, mixed $min)
static boolean isHex (mixed $value)
static boolean isHostname (mixed $value, [integer $allow = ISPK_HOST_ALLOW_ALL])
static boolean isInt (mixed $value)
static boolean isIp (mixed $value)
static boolean isLessThan (mixed $value, mixed $max)
static boolean isOneOf (mixed $value, [ $allowed = NULL])
static boolean isPhone (mixed $value, [ $country = 'US'])
static mixed isRegex (mixed $value, [mixed $pattern = NULL])
static boolean isUri (string $value, [integer $mode = ISPK_URI_ALLOW_COMMON])
static boolean isZip (mixed $value)
static Inspekt_Cage makeCookieCage ([ $config_file = NULL], [boolean $strict = TRUE])
static Inspekt_Cage makeEnvCage ([ $config_file = NULL], [boolean $strict = TRUE])
static Inspekt_Cage makeFilesCage ([ $config_file = NULL], [boolean $strict = TRUE])
static Inspekt_Cage makeGetCage ([ $config_file = NULL], [boolean $strict = TRUE])
static Inspekt_Cage makePostCage ([ $config_file = NULL], [boolean $strict = TRUE])
static Inspekt_Cage makeSessionCage ([ $config_file = NULL], [boolean $strict = TRUE])
static Inspekt_Supercage makeSuperCage ([ $config_file = NULL], [boolean $strict = TRUE])
static mixed noPath (mixed $value)
static mixed noTags (mixed $value)
int getInt (mixed $value)
mixed getPath (mixed $value)
boolean isAlnum (mixed $value)
boolean isAlpha (mixed $value)
boolean isBetween (mixed $value, mixed $min, mixed $max, [ $inc = TRUE])
boolean isCcnum (mixed $value, [mixed $type = NULL])
boolean isDate (mixed $value)
boolean isDigits (mixed $value)
boolean isEmail (string $value)
boolean isFloat (string $value)
Inspekt_Cage makeServerCage ([ $config_file = NULL], [boolean $strict = TRUE])
array _walkArray (array $input,  $method, string $inspektor)
Methods
static method getAlnum (line 345)

Returns only the alphabetic characters and digits in value.

  • tag: filter
static mixed getAlnum (mixed $value)
  • mixed $value
static method getAlpha (line 327)

Returns only the alphabetic characters in value.

  • tag: filter
static mixed getAlpha (mixed $value)
  • mixed $value
static method getDigits (line 363)

Returns only the digits in value. This differs from getInt().

  • tag: filter
static mixed getDigits (mixed $value)
  • mixed $value
static method getDir (line 381)

Returns dirname(value).

  • tag: filter
static mixed getDir (mixed $value)
  • mixed $value
static method isGreaterThan (line 592)

Returns TRUE if value is greater than $min, FALSE otherwise.

  • tag: validator
static boolean isGreaterThan (mixed $value, mixed $min)
  • mixed $value
  • mixed $min
static method isHex (line 607)

Returns TRUE if value is a valid hexadecimal format, FALSE otherwise.

  • tag: validator
static boolean isHex (mixed $value)
  • mixed $value
static method isHostname (line 626)

Returns TRUE if value is a valid hostname, FALSE otherwise.

Depending upon the value of $allow, Internet domain names, IP addresses, and/or local network names are considered valid. The default is HOST_ALLOW_ALL, which considers all of the above to be valid.

  • tag: validator
static boolean isHostname (mixed $value, [integer $allow = ISPK_HOST_ALLOW_ALL])
  • mixed $value
  • integer $allow: bitfield for ISPK_HOST_ALLOW_DNS, ISPK_HOST_ALLOW_IP, ISPK_HOST_ALLOW_LOCAL
static method isInt (line 690)

Returns TRUE if value is a valid integer value, FALSE otherwise.

  • tag: validator
static boolean isInt (mixed $value)
  • mixed $value
static method isIp (line 709)

Returns TRUE if value is a valid IP format, FALSE otherwise.

  • tag: validator
static boolean isIp (mixed $value)
  • mixed $value
static method isLessThan (line 724)

Returns TRUE if value is less than $max, FALSE otherwise.

  • tag: validator
static boolean isLessThan (mixed $value, mixed $max)
  • mixed $value
  • mixed $max
static method isOneOf (line 738)

Returns TRUE if value is one of $allowed, FALSE otherwise.

  • tag: validator
static boolean isOneOf (mixed $value, [ $allowed = NULL])
  • mixed $value
  • $allowed
static method isPhone (line 760)

Returns TRUE if value is a valid phone number format, FALSE otherwise. The optional second argument indicates the country.

This method requires that the value consist of only digits.

  • tag: validator
static boolean isPhone (mixed $value, [ $country = 'US'])
  • mixed $value
  • $country
static method isRegex (line 839)

Returns TRUE if value matches $pattern, FALSE otherwise. Uses preg_match() for the matching.

  • tag: validator
static mixed isRegex (mixed $value, [mixed $pattern = NULL])
  • mixed $value
  • mixed $pattern
static method isUri (line 857)

Enter description here...

static boolean isUri (string $value, [integer $mode = ISPK_URI_ALLOW_COMMON])
  • string $value
  • integer $mode
static method isZip (line 924)

Returns TRUE if value is a valid US ZIP, FALSE otherwise.

  • tag: validator
static boolean isZip (mixed $value)
  • mixed $value
static method makeCookieCage (line 169)

Returns the $_COOKIE data wrapped in an Inspekt_Cage object

This utilizes a singleton pattern to get around scoping issues

static Inspekt_Cage makeCookieCage ([ $config_file = NULL], [boolean $strict = TRUE])
  • boolean $strict: whether or not to nullify the superglobal array
  • $config_file
static method makeEnvCage (line 192)

Returns the $_ENV data wrapped in an Inspekt_Cage object

This utilizes a singleton pattern to get around scoping issues

static Inspekt_Cage makeEnvCage ([ $config_file = NULL], [boolean $strict = TRUE])
  • boolean $strict: whether or not to nullify the superglobal array
  • $config_file
static method makeFilesCage (line 215)

Returns the $_FILES data wrapped in an Inspekt_Cage object

This utilizes a singleton pattern to get around scoping issues

static Inspekt_Cage makeFilesCage ([ $config_file = NULL], [boolean $strict = TRUE])
  • boolean $strict: whether or not to nullify the superglobal array
  • $config_file
static method makeGetCage (line 124)

Returns the $_GET data wrapped in an Inspekt_Cage object

This utilizes a singleton pattern to get around scoping issues

static Inspekt_Cage makeGetCage ([ $config_file = NULL], [boolean $strict = TRUE])
  • boolean $strict: whether or not to nullify the superglobal array
  • $config_file
static method makePostCage (line 147)

Returns the $_POST data wrapped in an Inspekt_Cage object

This utilizes a singleton pattern to get around scoping issues

static Inspekt_Cage makePostCage ([ $config_file = NULL], [boolean $strict = TRUE])
  • boolean $strict: whether or not to nullify the superglobal array
  • $config_file
static method makeSessionCage (line 238)

Returns the $_SESSION data wrapped in an Inspekt_Cage object

This utilizes a singleton pattern to get around scoping issues

static Inspekt_Cage makeSessionCage ([ $config_file = NULL], [boolean $strict = TRUE])
  • boolean $strict: whether or not to nullify the superglobal array
  • $config_file
static method makeSuperCage (line 263)

Returns a Supercage object, which wraps ALL input superglobals

static Inspekt_Supercage makeSuperCage ([ $config_file = NULL], [boolean $strict = TRUE])
  • boolean $strict: whether or not to nullify the superglobal
  • $config_file
static method noPath (line 956)

Returns basename(value).

  • tag: filter
static mixed noPath (mixed $value)
  • mixed $value
static method noTags (line 938)

Returns value with all tags removed.

  • tag: filter
static mixed noTags (mixed $value)
  • mixed $value
getInt (line 398)

Returns (int) value.

  • tag: filter
int getInt (mixed $value)
  • mixed $value
getPath (line 415)

Returns realpath(value).

  • tag: filter
mixed getPath (mixed $value)
  • mixed $value
isAlnum (line 433)

Returns TRUE if every character is alphabetic or a digit, FALSE otherwise.

  • tag: validator
boolean isAlnum (mixed $value)
  • mixed $value
isAlpha (line 447)

Returns TRUE if every character is alphabetic, FALSE otherwise.

  • tag: validator
boolean isAlpha (mixed $value)
  • mixed $value
isBetween (line 465)

Returns TRUE if value is greater than or equal to $min and less than or equal to $max, FALSE otherwise. If $inc is set to FALSE, then the value must be strictly greater than $min and strictly less than $max.

  • tag: validator
boolean isBetween (mixed $value, mixed $min, mixed $max, [ $inc = TRUE])
  • mixed $value
  • mixed $min
  • mixed $max
  • $inc
isCcnum (line 492)

Returns TRUE if it is a valid credit card number format. The optional second argument allows developers to indicate the type.

  • tag: validator
boolean isCcnum (mixed $value, [mixed $type = NULL])
  • mixed $value
  • mixed $type
isDate (line 528)

Returns TRUE if value is a valid date, FALSE otherwise. The date is required to be in ISO 8601 format.

  • tag: validator
boolean isDate (mixed $value)
  • mixed $value
isDigits (line 544)

Returns TRUE if every character is a digit, FALSE otherwise.

This is just like isInt(), except there is no upper limit.

  • tag: validator
boolean isDigits (mixed $value)
  • mixed $value
isEmail (line 559)

Returns TRUE if value is a valid email format, FALSE otherwise.

boolean isEmail (string $value)
  • string $value
isFloat (line 572)

Returns TRUE if value is a valid float value, FALSE otherwise.

  • tag: validator
boolean isFloat (string $value)
  • string $value
makeServerCage (line 101)

Returns the $_SERVER data wrapped in an Inspekt_Cage object

This utilizes a singleton pattern to get around scoping issues

Inspekt_Cage makeServerCage ([ $config_file = NULL], [boolean $strict = TRUE])
  • boolean $strict: whether or not to nullify the superglobal array
  • $config_file
_walkArray (line 289)

Recursively walks an array and applies a given filter method to every value in the array.

This should be considered a "protected" method, and not be called outside of the class

array _walkArray (array $input,  $method, string $inspektor)
  • array $input
  • string $inspektor: The name of a static filtering method, like get* or no*
  • $method

Documentation generated on Mon, 31 Dec 2007 15:53:58 -0500 by phpDocumentor 1.4.1