Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe Input
+ Graphe d'héritage de Input:

Fonctions membres publiques

 __construct ($source=null, array $options=array())
 
 __get ($name)
 
 count ()
 
 get ($name, $default=null, $filter='cmd')
 
 getArray (array $vars=array(), $datasource=null)
 
 getInputForRequestMethod ()
 
 set ($name, $value)
 
 def ($name, $value)
 
 exists ($name)
 
 __call ($name, $arguments)
 
 getMethod ()
 
 serialize ()
 
 unserialize ($input)
 

Fonctions membres protégées

 loadAllInputs ()
 

Attributs protégés

 $options = array()
 
 $filter
 
 $data = array()
 
 $inputs = array()
 

Attributs protégés statiques

static $loaded = false
 

Attributs privés statiques

static $allowedGlobals = array('REQUEST', 'GET', 'POST', 'FILES', 'SERVER', 'ENV')
 

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $source = null,
array  $options = array() 
)

Constructor.

Paramètres
array$sourceOptional source data. If omitted, a copy of the server variable '_REQUEST' is used.
array$optionsAn optional associative array of configuration parameters: filter: An instance of Filter. If omitted, a default filter is initialised.
Depuis
1.0

Références Input\$options, et null.

Documentation des fonctions membres

◆ __call()

__call (   $name,
  $arguments 
)

Magic method to get filtered input data.

Paramètres
string$nameName of the filter type prefixed with 'get'.
array$arguments[0] The name of the variable [1] The default value.
Renvoie
mixed The filtered input value.
Depuis
1.0

Références $default, Input\$filter, $name, et null.

◆ __get()

__get (   $name)

Magic method to get an input object

Paramètres
mixed$nameName of the input object to retrieve.
Renvoie
Input The request input object
Depuis
1.0

Références $className, $GLOBALS, $name, et null.

◆ count()

count ( )

Get the number of variables.

Renvoie
integer The number of variables in the input.
Depuis
1.0
Voir également
Countable::count()

Référencé par ColorStyle\fromString(), et Cli\parseArguments().

◆ def()

def (   $name,
  $value 
)

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

Paramètres
string$nameName of the value to define.
mixed$valueValue to assign to the input.
Renvoie
void
Depuis
1.0

Références $name, et $value.

◆ exists()

exists (   $name)

Check if a value name exists.

Paramètres
string$nameValue name
Renvoie
boolean
Depuis
1.2.0

Références $name.

◆ get()

get (   $name,
  $default = null,
  $filter = 'cmd' 
)

Gets a value from the input data.

Paramètres
string$nameName of the value to get.
mixed$defaultDefault value to return if variable does not exist.
string$filterFilter to apply to the value.
Renvoie
mixed The filtered input value.
Voir également
::clean()
Depuis
1.0

Références $default, Input\$filter, et $name.

◆ getArray()

getArray ( array  $vars = array(),
  $datasource = null 
)

Gets an array of values from the request.

Paramètres
array$varsAssociative 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$datasourceArray to retrieve data from, or null
Renvoie
mixed The filtered input data.
Depuis
1.0

Références Input\$data, $results, elseif, et null.

◆ getInputForRequestMethod()

getInputForRequestMethod ( )

Get the Input instance holding the data for the current request method

Renvoie
Input
Depuis
1.3.0

Références Input\getMethod().

◆ getMethod()

getMethod ( )

Gets the request method.

Renvoie
string The request method.
Depuis
1.0

Référencé par Input\getInputForRequestMethod().

◆ loadAllInputs()

loadAllInputs ( )
protected

Method to load all of the global inputs.

Renvoie
void
Depuis
1.0

Références Input\$data, et $GLOBALS.

Référencé par Cli\serialize(), et Input\serialize().

◆ serialize()

serialize ( )

Method to serialize the input.

Renvoie
string The serialized input.
Depuis
1.0

Références Input\$inputs, et Input\loadAllInputs().

Référencé par Cli\serialize().

◆ set()

set (   $name,
  $value 
)

Sets a value

Paramètres
string$nameName of the value to set.
mixed$valueValue to assign to the input.
Renvoie
void
Depuis
1.0

Références $name, et $value.

◆ unserialize()

unserialize (   $input)

Method to unserialize the input.

Paramètres
string$inputThe serialized input.
Renvoie
void
Depuis
1.0

Références $input.

Documentation des champs

◆ $allowedGlobals

$allowedGlobals = array('REQUEST', 'GET', 'POST', 'FILES', 'SERVER', 'ENV')
staticprivate

◆ $data

$data = array()
protected

◆ $filter

$filter
protected

◆ $inputs

$inputs = array()
protected

Référencé par Cli\serialize(), et Input\serialize().

◆ $loaded

$loaded = false
staticprotected

◆ $options


La documentation de cette classe a été générée à partir du fichier suivant :