JInput
Joomla! Input Base Class
This is an abstracted input class used to manage retrieving data from the application environment.
| package |
Joomla.Platform |
|---|---|
| subpackage |
Application |
| since |
11.1 |
Methods
__call
Magic method to get filtered input data.
__call(mixed $name, string $arguments) : boolean
| since |
11.1 |
|---|
Arguments
- $name
mixedName of the value to get.- $arguments
stringDefault value to return if variable does not exist.
Response
booleanThe filtered boolean input value.
__construct
Constructor.
__construct(array $source = null, array $options = array())
| since |
11.1 |
|---|
Arguments
- $source
arraySource data (Optional, default is $_REQUEST)- $options
arrayArray of configuration parameters (Optional)
__get
Magic method to get an input object
__get(mixed $name) : \JInput
| since |
11.1 |
|---|
Arguments
- $name
mixedName of the input object to retrieve.
Response
\JInputThe request input object
def
Define a value. The value will only be set if there's no value for the name or if it is null.
def(string $name, mixed $value) : void
| since |
12.1 |
|---|
Arguments
- $name
stringName of the value to define.- $value
mixedValue to assign to the input.
get
Gets a value from the input data.
get(string $name, mixed $default = null, string $filter = 'cmd') : mixed
| since |
11.1 |
|---|
Arguments
- $name
stringName of the value to get.- $default
mixedDefault value to return if variable does not exist.- $filter
stringFilter to apply to the value.
Response
mixedThe filtered input value.
getAlnum
getAlnum(mixed $name, mixed $default) : string
Arguments
- $name
mixed- $default
mixed
Response
string
getArray
Gets an array of values from the request.
getArray(array $vars, mixed $datasource = null) : mixed
| since |
11.1 |
|---|
Arguments
- $vars
arrayAssociative array of keys and filter types to apply.- $datasource
mixedArray to retrieve data from, or null
Response
mixedThe filtered input data.
getBase64
getBase64(mixed $name, mixed $default) : string
Arguments
- $name
mixed- $default
mixed
Response
string
getBool
getBool(mixed $name, mixed $default) : boolean
Get a boolean.
Arguments
- $name
mixed- $default
mixed
Response
boolean
getCmd
getCmd(mixed $name, mixed $default) : string
Arguments
- $name
mixed- $default
mixed
Response
string
getFloat
getFloat(mixed $name, mixed $default) : float
Get a floating-point number.
Arguments
- $name
mixed- $default
mixed
Response
float
getHtml
getHtml(mixed $name, mixed $default) : string
Arguments
- $name
mixed- $default
mixed
Response
string
getInt
getInt(mixed $name, mixed $default) : integer
Get a signed integer.
Arguments
- $name
mixed- $default
mixed
Response
integer
getMethod
Gets the request method.
getMethod() : string
| since |
11.1 |
|---|
Response
stringThe request method.
getPath
getPath(mixed $name, mixed $default) : string
Arguments
- $name
mixed- $default
mixed
Response
string
getString
getString(mixed $name, mixed $default) : string
Arguments
- $name
mixed- $default
mixed
Response
string
getUint
getUint(mixed $name, mixed $default) : integer
Get an unsigned integer.
Arguments
- $name
mixed- $default
mixed
Response
integer
getUsername
getUsername(mixed $name, mixed $default) : string
Arguments
- $name
mixed- $default
mixed
Response
string
getWord
getWord(mixed $name, mixed $default) : string
Arguments
- $name
mixed- $default
mixed
Response
string
set
Sets a value
set(string $name, mixed $value) : void
| since |
11.1 |
|---|
Arguments
- $name
stringName of the value to set.- $value
mixedValue to assign to the input.
Properties
options
Options array for the JInput instance.
| since |
11.1 |
|---|
Type(s)
array
data
Input data.
| since |
11.1 |
|---|
Type(s)
array
inputs
Input objects
| since |
11.1 |
|---|
Type(s)
array