Zend Framework
3.0
|
Public Member Functions | |
__construct (array $args=null, array $env=null) | |
Create a new CLI request. | |
setParams (Parameters $params) | |
Exchange parameters object. | |
getParams () | |
Return the container responsible for parameters. | |
getParam ($name, $default=null) | |
Return a single parameter. | |
params () | |
Return the container responsible for parameters. | |
setEnv (Parameters $env) | |
Provide an alternate Parameter Container implementation for env parameters in this object, (this is NOT the primary API for value setting, for that see env()) | |
getEnv ($name, $default=null) | |
Return a single parameter container responsible for env parameters. | |
env () | |
Return the parameter container responsible for env parameters. | |
toString () | |
__toString () | |
Allow PHP casting of this object. | |
setScriptName ($scriptName) | |
getScriptName () | |
Protected Attributes | |
$params = null | |
$envParams = null | |
$scriptName = null | |
__construct | ( | array | $args = null , |
array | $env = null |
||
) |
Create a new CLI request.
array | null | $args | Console arguments. If not supplied, $_SERVER['argv'] will be used |
array | null | $env | Environment data. If not supplied, $_ENV will be used |
Exception\RuntimeException |
Extract first param assuming it is the script name
Store runtime params
Store environment data
__toString | ( | ) |
Allow PHP casting of this object.
env | ( | ) |
Return the parameter container responsible for env parameters.
getEnv | ( | $name, | |
$default = null |
|||
) |
Return a single parameter container responsible for env parameters.
string | $name | Parameter name |
string | $default | (optional) default value in case the parameter does not exist |
getParam | ( | $name, | |
$default = null |
|||
) |
Return a single parameter.
Shortcut for $request->params()->get()
string | $name | Parameter name |
string | $default | (optional) default value in case the parameter does not exist |
getParams | ( | ) |
Return the container responsible for parameters.
getScriptName | ( | ) |
params | ( | ) |
Return the container responsible for parameters.
setEnv | ( | Parameters | $env | ) |
Provide an alternate Parameter Container implementation for env parameters in this object, (this is NOT the primary API for value setting, for that see env())
\Zend\Stdlib\Parameters | $env |
setParams | ( | Parameters | $params | ) |
setScriptName | ( | $scriptName | ) |
string | $scriptName |
toString | ( | ) |
|
protected |
|
protected |
|
protected |