Class JInput

Description

Implements interfaces:

  • Serializable (internal interface)
  • Countable (internal interface)

Joomla! Input Base Class

This is an abstracted input class used to manage retrieving data from the application environment.

  • method: integer getInt(): getInt($name, $default = null) Get a signed integer.
  • method: integer getUint(): getUint($name, $default = null) Get an unsigned integer.
  • method: float getFloat(): getFloat($name, $default = null) Get a floating-point number.
  • method: boolean getBool(): getBool($name, $default = null) Get a boolean.
  • method: string getWord(): getWord($name, $default = null)
  • method: string getAlnum(): getAlnum($name, $default = null)
  • method: string getCmd(): getCmd($name, $default = null)
  • method: string getBase64(): getBase64($name, $default = null)
  • method: string getString(): getString($name, $default = null)
  • method: string getHtml(): getHtml($name, $default = null)
  • method: string getPath(): getPath($name, $default = null)
  • method: string getUsername(): getUsername($name, $default = null)
  • since: 11.1

Located in /libraries/joomla/input/input.php (line 41)


	
			
Direct descendents
Class Description
 class FOFInput FrameworkOnFramework input handling class. Extends upon the JInput class.
 class JInputCli Joomla! Input CLI Class
 class JInputCookie Joomla! Input Cookie Class
 class JInputFiles Joomla! Input Files Class
 class JInputJSON Joomla! Input JSON Class
Variable Summary
Method Summary
 JInput __construct ([array $source = null], [array $options = array()])
 integer count ()
 void def (string $name, mixed $value)
 mixed get (string $name, [mixed $default = null], [string $filter = 'cmd'])
 mixed getArray ([array $vars = array()], [mixed $datasource = null])
 string getMethod ()
 void loadAllInputs ()
 string serialize ()
 void set (string $name, mixed $value)
 JInput unserialize (string $input)
 mixed __call (string $name, array $arguments)
 JInput __get (mixed $name)
Variables
array $data = array() (line 65)

Input data.

  • since: 11.1
  • access: protected
JFilterInput $filter = null (line 57)

Filter object to use.

  • since: 11.1
  • access: protected
array $inputs = array() (line 73)

Input objects

  • since: 11.1
  • access: protected
array $options = array() (line 49)

Options array for the JInput instance.

  • since: 11.1
  • access: protected
Methods
Constructor __construct (line 83)

Constructor.

  • since: 11.1
  • access: public
JInput __construct ([array $source = null], [array $options = array()])
  • array $source: Source data (Optional, default is $_REQUEST)
  • array $options: Array of configuration parameters (Optional)

Redefined in descendants as:
count (line 152)

Get the number of variables.

  • return: The number of variables in the input.
  • see: Countable::count()
  • since: 12.2
  • access: public
integer count ()

Implementation of:
Countable::count
def (line 257)

Define a value. The value will only be set if there's no value for the name or if it is null.

  • since: 12.1
  • access: public
void def (string $name, mixed $value)
  • string $name: Name of the value to define.
  • mixed $value: Value to assign to the input.
get (line 168)

Gets a value from the input data.

  • return: The filtered input value.
  • since: 11.1
  • access: public
mixed get (string $name, [mixed $default = null], [string $filter = 'cmd'])
  • 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.

Redefined in descendants as:
getArray (line 190)

Gets an array of values from the request.

  • return: The filtered input data.
  • since: 11.1
  • access: public
mixed getArray ([array $vars = array()], [mixed $datasource = null])
  • array $vars: Associative array of keys and filter types to apply. If empty and datasource is null, all the input data will be returned but filtered using the default case in JFilterInput::clean.
  • mixed $datasource: Array to retrieve data from, or null
getMethod (line 301)

Gets the request method.

  • return: The request method.
  • since: 11.1
  • access: public
string getMethod ()
loadAllInputs (line 361)

Method to load all of the global inputs.

  • since: 12.1
  • access: protected
void loadAllInputs ()
serialize (line 315)

Method to serialize the input.

  • return: The serialized input.
  • since: 12.1
  • access: public
string serialize ()

Implementation of:
Serializable::serialize

Redefined in descendants as:
set (line 242)

Sets a value

  • since: 11.1
  • access: public
void set (string $name, mixed $value)
  • string $name: Name of the value to set.
  • mixed $value: Value to assign to the input.

Redefined in descendants as:
unserialize (line 338)

Method to unserialize the input.

  • return: The input object.
  • since: 12.1
  • access: public
JInput unserialize (string $input)
  • string $input: The serialized input.

Implementation of:
Serializable::unserialize

Redefined in descendants as:
__call (line 277)

Magic method to get filtered input data.

  • return: The filtered input value.
  • since: 11.1
  • access: public
mixed __call (string $name, array $arguments)
  • string $name: Name of the filter type prefixed with 'get'.
  • array $arguments: [0] The name of the variable [1] The default value.

Redefined in descendants as:
__get (line 116)

Magic method to get an input object

  • return: The request input object
  • since: 11.1
  • access: public
JInput __get (mixed $name)
  • mixed $name: Name of the input object to retrieve.

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