Input
class Input implements Serializable, Countable (View source)
Class Input
Properties
Input | $get | ||
Input | $post | ||
FormDataInput | $put | ||
FormDataInput | $patch | ||
FormDataInput | $delete | ||
FormDataInput | $link | ||
FormDataInput | $unlink | ||
Input | $request | ||
Input | $server | ||
Input | $env | ||
Input | $header | ||
PsrFilesInput | $files | ||
CookieInput | $cookie |
Methods
Prepare source.
Get the number of variables.
Gets a value from the input data.
Sets a value
Define a value. The value will only be set if there's no value for the name or if it is null.
Check if a value name exists.
Gets an array of values from the request.
Magic method to get filtered input data.
Gets the request method.
Method to serialize the input.
Method to unserialize the input.
Method to load all of the global inputs.
getAllInputs
dumpAllInputs
Method to get property Filter
Method to get property Data
toArray
Get data from array or object by path.
setByPath
Get a signed integer.
Get an unsigned integer.
Get a floating-point number.
Get a boolean.
Get a boolean.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Get URL
Get raw data
Get string or array and filter them.
Details
at line line 93
__construct(array $source = null, InputFilter $filter = null)
Constructor.
at line line 115
void
prepareSource(array $source = null, boolean $reference = false)
Prepare source.
at line line 216
integer
count()
Get the number of variables.
at line line 233
mixed
get(string $name, mixed $default = null, string $filter = 'cmd', string $separator = '.')
Gets a value from the input data.
at line line 254
set(string $name, mixed $value, string $separator = '.')
Sets a value
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.
at line line 288
bool
exists(string $name, string $separator = '.')
Check if a value name exists.
at line line 305
mixed
compact(array $vars = array(), mixed $datasource = null)
Gets an array of values from the request.
at line line 423
mixed
__call(string $name, array $arguments)
Magic method to get filtered input data.
at line line 452
string
getMethod()
Gets the request method.
at line line 488
string
serialize()
Method to serialize the input.
at line line 526
void
loadAllInputs()
Method to load all of the global inputs.
at line line 572
array
dumpAllInputs()
dumpAllInputs
at line line 605
InputFilter
getFilter()
Method to get property Filter
at line line 617
Input
setFilter(InputFilter $filter)
Method to set property filter
at line line 629
array
getRawData()
Method to get property Data
at line line 641
array
toArray(string $filter = 'raw')
toArray
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'].
at line line 729
static boolean
setByPath(mixed $data, string $path, mixed $value, string $separator = '.', string $storeType = 'array')
setByPath
at line line 52
integer
getInt($name, $default = null)
Get a signed integer.
at line line 52
integer
getUint($name, $default = null)
Get an unsigned integer.
at line line 52
float
getFloat($name, $default = null)
Get a floating-point number.
at line line 52
boolean
getBool($name, $default = null)
Get a boolean.
at line line 52
boolean
getBoolean($name, $default = null)
Get a boolean.
at line line 52
string
getWord($name, $default = null)
at line line 52
string
getAlnum($name, $default = null)
at line line 52
string
getCmd($name, $default = null)
at line line 52
string
getBase64($name, $default = null)
at line line 52
string
getString($name, $default = null)
at line line 52
string
getArray($name, $default = null)
at line line 52
string
getHtml($name, $default = null)
at line line 52
string
getPath($name, $default = null)
at line line 52
string
getUsername($name, $default = null)
at line line 52
string
getEmail($name, $default = null)
at line line 52
string
getUrl($name, $default = null)
Get URL
at line line 52
string
getRaw($name, $default = null)
Get raw data
at line line 52
mixed
getVar($name, $default = null)
Get string or array and filter them.