PsrInput
class PsrInput extends Input (View source)
Class PsrInput
Properties
Input | $get | ||
Input | $post | ||
Input | $put | ||
Input | $patch | ||
Input | $delete | ||
Input | $link | ||
Input | $unlink | ||
Input | $request | ||
Input | $server | ||
Input | $env | ||
PsrHeaderInput | $header | ||
PsrFilesInput | $files | ||
CookieInput | $cookie |
Methods
mixed
get(string $name, mixed $default = null, string $filter = 'cmd', string $separator = '.')
Gets a value from the input data.
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
mixed
compact(array $vars = array(), mixed $datasource = null)
Gets an array of values from the request.
from Input
static mixed
getByPath(mixed $data, mixed $path, string $separator = '.')
Get data from array or object by path.
from Input
Details
__construct(array $source = null, InputFilter $filter = null)
Constructor.
void
prepareSource(array $source = null, boolean $reference = false)
Prepare source.
mixed
get(string $name, mixed $default = null, string $filter = 'cmd', string $separator = '.')
Gets a value from the input data.
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.
bool
exists(string $name, string $separator = '.')
Check if a value name exists.
mixed
compact(array $vars = array(), mixed $datasource = null)
Gets an array of values from the request.
mixed
__call(string $name, array $arguments)
Magic method to get filtered input data.
InputFilter
getFilter()
Method to get property Filter
Input
setFilter(InputFilter $filter)
Method to set property filter
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'].
static boolean
setByPath(mixed $data, string $path, mixed $value, string $separator = '.', string $storeType = 'array')
setByPath