class FormDataInput extends Input (View source)

The FormInput class.

Properties

Input $get from Input
Input $post from Input
FormDataInput $put from Input
FormDataInput $patch from Input
FormDataInput $delete from Input
$link from Input
$unlink from Input
Input $request from Input
Input $server from Input
Input $env from Input
Input $header from Input
PsrFilesInput $files from Input
$cookie from Input

Methods

__construct(array $source = null, InputFilter $filter = null)

Constructor.

from Input
void
prepareSource(array $source = null, boolean $reference = false)

Prepare source.

__get(mixed $name)

Magic method to get an input object

from Input
void
__set(string $name, Input $value)

__set

from Input
integer
count()

Get the number of variables.

from Input
mixed
get(string $name, mixed $default = null, string $filter = 'cmd', string $separator = '.')

Gets a value from the input data.

from Input
set(string $name, mixed $value, string $separator = '.')

Sets a value

from Input
def(string $name, mixed $value, string $separator = '.')

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

from Input
bool
exists(string $name, string $separator = '.')

Check if a value name exists.

from Input
mixed
compact(array $vars = array(), mixed $datasource = null)

Gets an array of values from the request.

from Input
extract(string $name, string $separator = '.')

extract

from Input
merge(array $array, bool $recursive = false)

merge

from Input
mixed
__call(string $name, array $arguments)

Magic method to get filtered input data.

from Input
string
getMethod()

Gets the request method.

from Input
setMethod(string $method)

Method to set property method

from Input
string
serialize()

Method to serialize the input.

from Input
unserialize(string $input)

Method to unserialize the input.

from Input
void
loadAllInputs()

Method to load all of the global inputs.

from Input
Input[]
getAllInputs()

getAllInputs

from Input
array
dumpAllInputs()

dumpAllInputs

from Input
setData(array $data)

Method to set property data

from Input
getFilter()

Method to get property Filter

from Input
setFilter(InputFilter $filter)

Method to set property filter

from Input
array
getRawData()

Method to get property Data

from Input
array
toArray(string $filter = 'raw')

toArray

from Input
static mixed
getByPath(mixed $data, mixed $path, string $separator = '.')

Get data from array or object by path.

from Input
static boolean
setByPath(mixed $data, string $path, mixed $value, string $separator = '.', string $storeType = 'array')

setByPath

from Input
integer
getInt($name, $default = null)

Get a signed integer.

from Input
integer
getUint($name, $default = null)

Get an unsigned integer.

from Input
float
getFloat($name, $default = null)

Get a floating-point number.

from Input
boolean
getBool($name, $default = null)

Get a boolean.

from Input
boolean
getBoolean($name, $default = null)

Get a boolean.

from Input
string
getWord($name, $default = null)

No description

from Input
string
getAlnum($name, $default = null)

No description

from Input
string
getCmd($name, $default = null)

No description

from Input
string
getBase64($name, $default = null)

No description

from Input
string
getString($name, $default = null)

No description

from Input
string
getArray($name, $default = null)

No description

from Input
string
getHtml($name, $default = null)

No description

from Input
string
getPath($name, $default = null)

No description

from Input
string
getUsername($name, $default = null)

No description

from Input
string
getEmail($name, $default = null)

No description

from Input
string
getUrl($name, $default = null)

Get URL

from Input
string
getRaw($name, $default = null)

Get raw data

from Input
mixed
getVar($name, $default = null)

Get string or array and filter them.

from Input
static string
getRawFormData()

Gets the raw HTTP data string from the request.

static string
setRawFormData(string $data)

setRawData

static array
parseFormData(string $input, array $data)

parseFormData

Details

in Input at line line 93
__construct(array $source = null, InputFilter $filter = null)

Constructor.

Parameters

array $source Optional source data. If omitted, a copy of the server variable '_REQUEST' is used.
InputFilter $filter The input filter object.

at line line 34
void prepareSource(array $source = null, boolean $reference = false)

Prepare source.

Parameters

array $source Optional source data. If omitted, a copy of the server variable '_REQUEST' is used.
boolean $reference If set to true, he source in first argument will be reference.

Return Value

void

in Input at line line 143
Input __get(mixed $name)

Magic method to get an input object

Parameters

mixed $name Name of the input object to retrieve.

Return Value

Input The request input object

in Input at line line 195
void __set(string $name, Input $value)

__set

Parameters

string $name
Input $value

Return Value

void

in Input at line line 216
integer count()

Get the number of variables.

Return Value

integer The number of variables in the input.

See also

Countable::count()

in Input at line line 233
mixed get(string $name, mixed $default = null, string $filter = 'cmd', string $separator = '.')

Gets a value from the input data.

Parameters

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.
string $separator Separator for path.

Return Value

mixed The filtered input value.

in Input at line line 254
set(string $name, mixed $value, string $separator = '.')

Sets a value

Parameters

string $name Name of the value to set.
mixed $value Value to assign to the input.
string $separator Symbol to separate path.

in Input at line line 268
def(string $name, mixed $value, string $separator = '.')

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

Parameters

string $name Name of the value to define.
mixed $value Value to assign to the input.
string $separator Symbol to separate paths.

in Input at line line 288
bool exists(string $name, string $separator = '.')

Check if a value name exists.

Parameters

string $name Value name
string $separator Symbol to separate path.

Return Value

bool

in Input at line line 305
mixed compact(array $vars = array(), mixed $datasource = null)

Gets an array of values from the request.

Parameters

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

Return Value

mixed The filtered input data.

in Input at line line 357
Input extract(string $name, string $separator = '.')

extract

Parameters

string $name
string $separator

Return Value

Input

in Input at line line 372
Input merge(array $array, bool $recursive = false)

merge

Parameters

array $array
bool $recursive

Return Value

Input

in Input at line line 423
mixed __call(string $name, array $arguments)

Magic method to get filtered input data.

Parameters

string $name Name of the filter type prefixed with 'get'.
array $arguments [0] The name of the variable [1] The default value.

Return Value

mixed The filtered input value.

in Input at line line 452
string getMethod()

Gets the request method.

Return Value

string The request method.

in Input at line line 474
Input setMethod(string $method)

Method to set property method

Parameters

string $method

Return Value

Input Return self to support chaining.

in Input at line line 488
string serialize()

Method to serialize the input.

Return Value

string The serialized input.

in Input at line line 511
Input unserialize(string $input)

Method to unserialize the input.

Parameters

string $input The serialized input.

Return Value

Input The input object.

in Input at line line 526
void loadAllInputs()

Method to load all of the global inputs.

Return Value

void

in Input at line line 560
Input[] getAllInputs()

getAllInputs

Return Value

Input[]

in Input at line line 572
array dumpAllInputs()

dumpAllInputs

Return Value

array

in Input at line line 593
Input setData(array $data)

Method to set property data

Parameters

array $data

Return Value

Input Return self to support chaining.

in Input at line line 605
InputFilter getFilter()

Method to get property Filter

Return Value

InputFilter

in Input at line line 617
Input setFilter(InputFilter $filter)

Method to set property filter

Parameters

InputFilter $filter

Return Value

Input Return self to support chaining.

in Input at line line 629
array getRawData()

Method to get property Data

Return Value

array

in Input at line line 641
array toArray(string $filter = 'raw')

toArray

Parameters

string $filter

Return Value

array

in Input at line line 686
static mixed getByPath(mixed $data, mixed $path, string $separator = '.')

Get data from array or object by path.

Example: ArrayHelper::getByPath($array, 'foo.bar.yoo') equals to $array['foo']['bar']['yoo'].

Parameters

mixed $data An array or object to get value.
mixed $path The key path.
string $separator Separator of paths.

Return Value

mixed Found value, null if not exists.

in Input at line line 729
static boolean setByPath(mixed $data, string $path, mixed $value, string $separator = '.', string $storeType = 'array')

setByPath

Parameters

mixed $data &$data
string $path
mixed $value
string $separator
string $storeType

Return Value

boolean

in Input at line line 52
integer getInt($name, $default = null)

Get a signed integer.

Parameters

$name
$default

Return Value

integer

in Input at line line 52
integer getUint($name, $default = null)

Get an unsigned integer.

Parameters

$name
$default

Return Value

integer

in Input at line line 52
float getFloat($name, $default = null)

Get a floating-point number.

Parameters

$name
$default

Return Value

float

in Input at line line 52
boolean getBool($name, $default = null)

Get a boolean.

Parameters

$name
$default

Return Value

boolean

in Input at line line 52
boolean getBoolean($name, $default = null)

Get a boolean.

Parameters

$name
$default

Return Value

boolean

in Input at line line 52
string getWord($name, $default = null)

Parameters

$name
$default

Return Value

string

in Input at line line 52
string getAlnum($name, $default = null)

Parameters

$name
$default

Return Value

string

in Input at line line 52
string getCmd($name, $default = null)

Parameters

$name
$default

Return Value

string

in Input at line line 52
string getBase64($name, $default = null)

Parameters

$name
$default

Return Value

string

in Input at line line 52
string getString($name, $default = null)

Parameters

$name
$default

Return Value

string

in Input at line line 52
string getArray($name, $default = null)

Parameters

$name
$default

Return Value

string

in Input at line line 52
string getHtml($name, $default = null)

Parameters

$name
$default

Return Value

string

in Input at line line 52
string getPath($name, $default = null)

Parameters

$name
$default

Return Value

string

in Input at line line 52
string getUsername($name, $default = null)

Parameters

$name
$default

Return Value

string

in Input at line line 52
string getEmail($name, $default = null)

Parameters

$name
$default

Return Value

string

in Input at line line 52
string getUrl($name, $default = null)

Get URL

Parameters

$name
$default

Return Value

string

in Input at line line 52
string getRaw($name, $default = null)

Get raw data

Parameters

$name
$default

Return Value

string

in Input at line line 52
mixed getVar($name, $default = null)

Get string or array and filter them.

Parameters

$name
$default

Return Value

mixed

at line line 74
static string getRawFormData()

Gets the raw HTTP data string from the request.

Return Value

string The raw HTP data string from the request.

at line line 86
static string setRawFormData(string $data)

setRawData

Parameters

string $data

Return Value

string

at line line 125
static array parseFormData(string $input, array $data)

parseFormData

Parameters

string $input
array $data &$data

Return Value

array