Class FOFInput
FrameworkOnFramework input handling class. Extends upon the JInput class.
-
JInput
-
FOFInput
Methods summary
public
|
#
__construct( array|string|object|null $source = null, array $options = array() )
Public constructor. Overriden to allow specifying the global input array to
use as a string and instantiate from an objetc holding variables.
Public constructor. Overriden to allow specifying the global input array to
use as a string and instantiate from an objetc holding variables.
Parameters
- $source
array|string|object|null - $source Source data; set null to use $_REQUEST
- $options
array - $options Filter options
|
public
mixed
|
#
get( string $name, mixed $default = null, string $filter = 'cmd', integer $mask = 0 )
Gets a value from the input data. Overriden to allow specifying a filter
mask.
Gets a value from the input data. Overriden to allow specifying a filter
mask.
Parameters
- $name
string - $name Name of the value to get.
- $default
mixed - $default Default value to return if variable does not exist.
- $filter
string - $filter Filter to apply to the value.
- $mask
integer - $mask The filter mask
Returns
mixed - The filtered input value.
|
public
array
|
#
getData( )
Returns a copy of the raw data stored in the class
Returns a copy of the raw data stored in the class
Returns
array
|
public static
mixed
|
#
__callStatic( string $name, array $arguments )
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!
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!
Parameters
- $name
string - $name Name of the method we're calling
- $arguments
array - $arguments The arguments passed to the method
Returns
mixed
|
public
boolean
|
#
__call( mixed $name, string $arguments )
Magic method to get filtered input data.
Magic method to get filtered input data.
Parameters
- $name
mixed - $name Name of the value to get.
- $arguments
string - $arguments Default value to return if variable does not exist.
Returns
boolean - The filtered boolean input value.
|
public static
string
|
#
setVar( string $name, mixed $value = null, array & $input = array(), boolean $overwrite = true )
Sets an input variable. WARNING: IT SHOULD NO LONGER BE USED!
Sets an input variable. WARNING: IT SHOULD NO LONGER BE USED!
Deprecated
Parameters
- $name
string - $name The name of the variable to set
- $value
mixed - $value The value to set it to
- $input
array - &$input The input array or FOFInput object
- $overwrite
boolean - $overwrite Should I overwrite existing values (default: true)
Returns
string - Previous value
|
protected
mixed
|
#
_cleanVar( mixed $var, integer $mask = 0, string $type = null )
Custom filter implementation. Works better with arrays and allows the use of
a filter mask.
Custom filter implementation. Works better with arrays and allows the use of
a filter mask.
Parameters
- $var
mixed - $var The variable (value) to clean
- $mask
integer - $mask The clean mask
- $type
string - $type The variable type
Returns
mixed
|
Magic methods summary