Cookie
Extends InputJoomla! Input Cookie Class
| since |
1.0 |
|---|---|
| package |
Joomla Framework |
Methods
__call
Magic method to get filtered input data.
__call( name, mixed||string|int arguments) :
| since |
1.0 |
|---|
Arguments
- name
stringName of the filter type prefixed with 'get'.- arguments
array<string|int, mixed>[0] The name of the variable [1] The default value.
Response
mixedThe filtered input value.
__construct
Constructor.
__construct(array|null source = null, mixed||string|int options = []) :
| since |
1.0 |
|---|
Arguments
- source
array<string|int, mixed>|nullSource data (Optional, default is $_COOKIE)- options
array<string|int, mixed>Array of configuration parameters (Optional)
Response
mixed
__get
Magic method to get an input object
__get( name) : \Joomla\Input\Input
| since |
1.0 |
|---|
Arguments
- name
mixedName of the input object to retrieve.
Response
InputThe request input object
count
Get the number of variables.
count() :
| since |
1.0 |
|---|---|
| see | Countable::count() |
Response
intThe number of variables in the input.
def
Define a value. The value will only be set if there's no value for the name or if it is null.
def( name, value) :
| since |
1.0 |
|---|
Arguments
- name
stringName of the value to define.- value
mixedValue to assign to the input.
Response
void
exists
Check if a value name exists.
exists( name) :
| since |
1.2.0 |
|---|
Arguments
- name
stringValue name
Response
bool
get
Gets a value from the input data.
get( name, default = null, filter = 'cmd') :
| see | InputFilter::clean() |
|---|---|
| since |
1.0 |
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( name, default = = 'null') :
Get an alphanumeric string.
Arguments
- name
mixed- default
mixed
Response
string
getArray
Gets an array of values from the request.
getArray(mixed||string|int vars = [], datasource = null) :
| since |
1.0 |
|---|
Arguments
- vars
array<string|int, mixed>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 InputFilter::clean.- datasource
mixedArray to retrieve data from, or null
Response
mixedThe filtered input data.
getBase64
getBase64( name, default = = 'null') :
Get a base64 encoded string.
Arguments
- name
mixed- default
mixed
Response
string
getBool
getBool( name, default = = 'null') :
Get a boolean value.
Arguments
- name
mixed- default
mixed
Response
bool
getCmd
getCmd( name, default = = 'null') :
Get a CMD filtered string.
Arguments
- name
mixed- default
mixed
Response
string
getFloat
getFloat( name, default = = 'null') :
Get a floating-point number.
Arguments
- name
mixed- default
mixed
Response
float
getHtml
getHtml( name, default = = 'null') :
Get a HTML string.
Arguments
- name
mixed- default
mixed
Response
string
getInputForRequestMethod
Get the Input instance holding the data for the current request method
getInputForRequestMethod() : \Joomla\Input\Input
getInt
getInt( name, default = = 'null') :
Get a signed integer.
Arguments
- name
mixed- default
mixed
Response
int
getMethod
Gets the request method.
getMethod() :
| since |
1.0 |
|---|
Response
stringThe request method.
getPath
getPath( name, default = = 'null') :
Get a file path.
Arguments
- name
mixed- default
mixed
Response
string
getRaw
getRaw( name, default = = 'null') :
Get an unfiltered value.
Arguments
- name
mixed- default
mixed
Response
mixed
getString
getString( name, default = = 'null') :
Get a string.
Arguments
- name
mixed- default
mixed
Response
string
getUint
getUint( name, default = = 'null') :
Get an unsigned integer.
Arguments
- name
mixed- default
mixed
Response
int
getUsername
getUsername( name, default = = 'null') :
Get a username.
Arguments
- name
mixed- default
mixed
Response
string
getWord
getWord( name, default = = 'null') :
Get a word.
Arguments
- name
mixed- default
mixed
Response
string
set
Sets a value
set( name, value, mixed||string|int options = []) :
| link | |
|---|---|
| since |
1.0 |
| note |
As of 1.4.0, the (name, value, expire, path, domain, secure, httpOnly) signature is deprecated and will not be supported when support for PHP 7.2 and earlier is dropped |
Arguments
- name
stringName of the value to set.- value
mixedValue to assign to the input.- options
array<string|int, mixed>An associative array which may have any of the keys expires, path, domain, secure, httponly and samesite. The values have the same meaning as described for the parameters with the same name. The value of the samesite element should be either Lax or Strict. If any of the allowed options are not given, their default values are the same as the default values of the explicit parameters. If the samesite element is omitted, no SameSite cookie attribute is set.
Response
void
Properties
options
Options array for the Input instance.
| since |
1.0 |
|---|
Type(s)
array<string|int, mixed>
data
Input data.
| since |
1.0 |
|---|
Type(s)
array<string|int, mixed>