NullInput
class NullInput extends CliInput (View source)
The YesManInput class.
Properties
Input | $get | from Input | |
Input | $post | from Input | |
FormDataInput | $put | from Input | |
FormDataInput | $patch | from Input | |
FormDataInput | $delete | from Input | |
FormDataInput | $link | from Input | |
FormDataInput | $unlink | from Input | |
Input | $request | from Input | |
Input | $server | from Input | |
Input | $env | from Input | |
Input | $header | from Input | |
PsrFilesInput | $files | from Input | |
CookieInput | $cookie | from Input | |
string | $calledScript | The executable that was called to run the CLI script. | from CliInput |
array | $args | The additional arguments passed to the script that are not associated with a specific argument name. | from CliInput |
Methods
Gets a value from the input data.
Define a value. The value will only be set if there's no value for the name or if it is null.
Gets an array of values from the request.
Get data from array or object by path.
setByPath
Get a value from standard 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 = 'string', 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
at line line 25
string
in()
Get a value from standard input.