package Default
inherited_from \Zend\Stdlib\Message

 Methods

Create a new CLI request

__construct(array|null $args = null, array|null $env = null

Parameters

$args

arraynull

Console arguments. If not supplied, $_SERVER['argv'] will be used

$env

arraynull

Environment data. If not supplied, $_ENV will be used

Exceptions

\Zend\Console\Exception\RuntimeException

Allow PHP casting of this object

__toString() : string

Returns

string

Return the parameter container responsible for env parameters

env() : \Zend\Stdlib\Parameters

Returns

\Zend\Stdlib\Parameters

Get message content

getContent() : mixed
Inherited
inherited_from \Zend\Stdlib\MessageInterface::getContent()

Returns

mixed

Return a single parameter container responsible for env parameters

getEnv(string $name, string $default = null) : \Zend\Stdlib\Parameters

Parameters

$name

string

Parameter name

$default

string

(optional) default value in case the parameter does not exist

Returns

\Zend\Stdlib\Parameters

Return a single parameter.

getParam(string $name, string $default = null) : mixed

Shortcut for $request->params()->get()

Parameters

$name

string

Parameter name

$default

string

(optional) default value in case the parameter does not exist

Returns

mixed

Return the container responsible for parameters

getParams() : \Zend\Stdlib\Parameters

Returns

\Zend\Stdlib\Parameters

getScriptName()

getScriptName() : string

Returns

string

Return the container responsible for parameters

params() : \Zend\Stdlib\Parameters

Returns

\Zend\Stdlib\Parameters

Set message content

setContent(mixed $value) : \Zend\Stdlib\Message
Inherited
inherited_from \Zend\Stdlib\MessageInterface::setContent()

Parameters

$value

mixed

Returns

\Zend\Stdlib\Message

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())

setEnv(\Zend\Stdlib\Parameters $env) : \Zend\Console\Request

Parameters

$env

\Zend\Stdlib\Parameters

Returns

\Zend\Console\Request

Exchange parameters object

setParams(\Zend\Stdlib\Parameters $params) : \Zend\Console\Request

Parameters

$params

\Zend\Stdlib\Parameters

Returns

\Zend\Console\Request

setScriptName()

setScriptName(string $scriptName) 

Parameters

$scriptName

string

toString()

toString() : string
inherited_from \Zend\Stdlib\Message::toString()

Returns

string

toString()

toString() : string
Inherited

Returns

string

 Properties

 

$content

$content : string

Default

''
 

$envParams

$envParams : \Zend\Stdlib\Parameters

Default

null
   

$params

$params : \Zend\Stdlib\Parameters

Default

null
 

$scriptName

$scriptName : string

Default

null