Class Request

Summary

Fully Qualified Name: Laminas\Console\Request
Extends: Message
Implements: RequestInterface

Description

Methods

Name Description Defined By
__construct() Create a new CLI request Request
__toString() Allow PHP casting of this object Request
env() Return the parameter container responsible for env parameters Request
getContent() Get message content Message
getEnv() Return a single parameter container responsible for env parameters Request
getMetadata() Retrieve all metadata or a single metadatum as specified by key Message
getParam() Return a single parameter. Request
getParams() Return the container responsible for parameters Request
getScriptName() Request
params() Return the container responsible for parameters Request
setContent() Set message content Message
setEnv() 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()) Request
setMetadata() Set message metadata Message
setParams() Exchange parameters object Request
setScriptName() Request
toString() Request

Method Details

__construct()

Create a new CLI request

Parameter Name Type Description
$args array|null Console
$env array|null Environment

Returns:

__toString()

Allow PHP casting of this object

Returns: string

env()

Return the parameter container responsible for env parameters

Returns: \Laminas\Stdlib\Parameters

getContent()

Get message content

Returns: mixed

getEnv()

Return a single parameter container responsible for env parameters

Parameter Name Type Description
$name string Parameter
$default string (optional)

Returns: \Laminas\Stdlib\Parameters

getMetadata()

Retrieve all metadata or a single metadatum as specified by key

Parameter Name Type Description
$key null|string|int
$default null|mixed

Returns: mixed

getParam()

Return a single parameter.

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

Parameter Name Type Description
$name string Parameter
$default string (optional)

Returns: mixed

getParams()

Return the container responsible for parameters

Returns: \Laminas\Stdlib\Parameters

getScriptName()

Returns: string

params()

Return the container responsible for parameters

Returns: \Laminas\Stdlib\Parameters

setContent()

Set message content

Parameter Name Type Description
$value mixed

Returns: \Message

setEnv()

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

Parameter Name Type Description
$env \Laminas\Stdlib\Parameters

Returns: \Laminas\Console\Request

setMetadata()

Set message metadata

Non-destructive setting of message metadata; always adds to the metadata, never overwrites the entire metadata container.

Parameter Name Type Description
$spec string|int|array|\Traversable
$value mixed

Returns: \Message

setParams()

Exchange parameters object

Parameter Name Type Description
$params \Laminas\Stdlib\Parameters

Returns: \Request

setScriptName()

Parameter Name Type Description
$scriptName string

Returns:

toString()

Returns: string

Top