CliInput
class CliInput extends Input implements CliInputInterface (View source)
Windwalker Input CLI 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. | |
array | $args | The additional arguments passed to the script that are not associated with a specific argument name. |
Methods
Prepare source.
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.
Method to serialize the input.
Method to unserialize the input.
Get data from array or object by path.
setByPath
Gets an array of values from the request.
getArgument
setArgument
Get a value from standard input.
getInputStream
setInputStream
getCalledScript
setCalledScript
Details
__construct(array $source = null, InputFilter $filter = null)
Constructor.
at line line 53
void
prepareSource(array $source = null, boolean $reference = false)
Prepare source.
at line line 92
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.
at line line 66
string
serialize()
Method to serialize the input.
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 104
mixed
all()
Gets an array of values from the request.
at line line 134
mixed
getArgument(integer $offset, mixed $default = null)
getArgument
at line line 255
string
in()
Get a value from standard input.
at line line 265
resource
getInputStream()
getInputStream
at line line 289
string
getCalledScript()
getCalledScript