Class jFilter

Description

utility class to check values

  • since: 1.0b1

Located in /utils/jFilter.class.php (line 19)


	
			
Class Constant Summary
Method Summary
static void cleanAttr ( $node)
static string cleanHtml (string $html, [ $isXhtml = false])
static boolean isBool (string $val)
static boolean isEmail (string $val)
static boolean isFloat (string $val, [int $min = null], [int $max = null])
static boolean isHexInt (string $val, [int $min = null], [int $max = null])
static boolean isInt (string $val, [int $min = null], [int $max = null])
static boolean isIPv4 (string $val)
static boolean isIPv6 (string $val)
static boolean isUrl (string $url, [ $schemeRequired = false], [ $hostRequired = false], [ $pathRequired = false], [ $queryRequired = false])
static void usePhpFilter ()
Methods
static cleanAttr (line 230)
  • access: protected
static void cleanAttr ( $node)
  • $node
static cleanHtml (line 153)

remove all javascript things in a html content

The html content should be a subtree of a body tag, not a whole document

  • return: the cleaned html content
  • since: 1.1
  • access: public
static string cleanHtml (string $html, [ $isXhtml = false])
  • string $html: html content
  • $isXhtml
static isBool (line 63)

check if the given value is a boolean

  • return: true if it is valid
  • access: public
static boolean isBool (string $val)
  • string $val: the value
static isEmail (line 139)

check if the given value is an email

  • return: true if it is valid
  • access: public
static boolean isEmail (string $val)
  • string $val: the value
static isFloat (line 77)

check if the given value is a float

  • return: true if it is valid
  • access: public
static boolean isFloat (string $val, [int $min = null], [int $max = null])
  • string $val: the value
  • int $min: minimum value (optional), null if no minimum
  • int $max: maximum value (optional), null if no maximum
static isHexInt (line 49)

check if the given value is an hexadecimal integer

  • return: true if it is valid
  • access: public
static boolean isHexInt (string $val, [int $min = null], [int $max = null])
  • string $val: the value
  • int $min: minimum value (optional), null if no minimum
  • int $max: maximum value (optional), null if no maximum
static isInt (line 34)

check if the given value is an integer

  • return: true if it is valid
  • access: public
static boolean isInt (string $val, [int $min = null], [int $max = null])
  • string $val: the value
  • int $min: minimum value (optional), null if no minimum
  • int $max: maximum value (optional), null if no maximum
static isIPv4 (line 121)

check if the given value is an IP version 4

  • return: true if it is valid
  • access: public
static boolean isIPv4 (string $val)
  • string $val: the value
static isIPv6 (line 130)

check if the given value is an IP version 6

  • return: true if it is valid
  • access: public
static boolean isIPv6 (string $val)
  • string $val: the value
static isUrl (line 91)

check if the given value is

  • return: true if it is valid
  • access: public
static boolean isUrl (string $url, [ $schemeRequired = false], [ $hostRequired = false], [ $pathRequired = false], [ $queryRequired = false])
  • string $url: the url
  • $schemeRequired
  • $hostRequired
  • $pathRequired
  • $queryRequired
static usePhpFilter (line 23)
  • access: public
static void usePhpFilter ()
Class Constants
BAD_SAVE_HTML = 2 (line 144)
INVALID_HTML = 1 (line 143)

Documentation generated on Wed, 04 Jan 2017 22:54:10 +0100 by phpDocumentor 1.4.3