Class FOFInput

Description

FrameworkOnFramework input handling class. Extends upon the JInput class.

  • since: 2.0

Located in /libraries/fof/input/input.php (line 17)

JInput
   |
   --FOFInput
Method Summary
 static string setVar (string $name, [mixed $value = null], [array &$input = array()], [boolean $overwrite = true])
 static mixed __callStatic (string $name, array $arguments)
 FOFInput __construct ([array|string|object|null $source = null], [array $options = array()])
 mixed get (string $name, [mixed $default = null], [string $filter = 'cmd'], [int $mask = 0])
 array getData ()
 mixed _cleanVar (mixed $var, [integer $mask = 0], [string $type = null])
 boolean __call (mixed $name, string $arguments)
Variables
Methods
static setVar (line 218)

Sets an input variable. WARNING: IT SHOULD NO LONGER BE USED!

  • return: Previous value
  • deprecated:
  • access: public
static string setVar (string $name, [mixed $value = null], [array &$input = array()], [boolean $overwrite = true])
  • string $name: The name of the variable to set
  • mixed $value: The value to set it to
  • array &$input: The input array or FOFInput object
  • boolean $overwrite: Should I overwrite existing values (default: true)
static __callStatic (line 133)

Old static methods are now deprecated. This magic method makes sure there is a continuity in our approach. The downside is that it's only compatible with PHP 5.3.0. Sorry!

  • access: public
static mixed __callStatic (string $name, array $arguments)
  • string $name: Name of the method we're calling
  • array $arguments: The arguments passed to the method
Constructor __construct (line 26)

Public constructor. Overriden to allow specifying the global input array to use as a string and instantiate from an objetc holding variables.

  • access: public
FOFInput __construct ([array|string|object|null $source = null], [array $options = array()])
  • array|string|object|null $source: Source data; set null to use $_REQUEST
  • array $options: Filter options

Redefinition of:
JInput::__construct()
Constructor.
get (line 103)

Gets a value from the input data. Overriden to allow specifying a filter mask.

  • return: The filtered input value.
  • access: public
mixed get (string $name, [mixed $default = null], [string $filter = 'cmd'], [int $mask = 0])
  • string $name: Name of the value to get.
  • mixed $default: Default value to return if variable does not exist.
  • string $filter: Filter to apply to the value.
  • int $mask: The filter mask

Redefinition of:
JInput::get()
Gets a value from the input data.
getData (line 118)

Returns a copy of the raw data stored in the class

  • access: public
array getData ()
_cleanVar (line 262)

Custom filter implementation. Works better with arrays and allows the use of a filter mask.

  • access: protected
mixed _cleanVar (mixed $var, [integer $mask = 0], [string $type = null])
  • mixed $var: The variable (value) to clean
  • integer $mask: The clean mask
  • string $type: The variable type
__call (line 183)

Magic method to get filtered input data.

  • return: The filtered boolean input value.
  • access: public
boolean __call (mixed $name, string $arguments)
  • mixed $name: Name of the value to get.
  • string $arguments: Default value to return if variable does not exist.

Redefinition of:
JInput::__call()
Magic method to get filtered input data.

Inherited Methods

Inherited From JInput

 JInput::__construct()
 JInput::count()
 JInput::def()
 JInput::get()
 JInput::getArray()
 JInput::getMethod()
 JInput::loadAllInputs()
 JInput::serialize()
 JInput::set()
 JInput::unserialize()
 JInput::__call()
 JInput::__get()

Documentation generated on Tue, 19 Nov 2013 15:05:37 +0100 by phpDocumentor 1.4.3