Fully Qualified Name: | Laminas\Mvc\MvcEvent |
Extends: | Event |
Name | Description | Defined By |
---|---|---|
__construct() | Constructor | Event |
getApplication() | Get application instance | MvcEvent |
getController() | Get the currently registered controller name | MvcEvent |
getControllerClass() | Get controller class | MvcEvent |
getError() | Retrieve the error message, if any | MvcEvent |
getName() | Get event name | Event |
getParam() | Get an individual parameter | Event |
getParams() | Get all parameters | Event |
getRequest() | Get request | MvcEvent |
getResponse() | Get response | MvcEvent |
getResult() | Get result | MvcEvent |
getRouteMatch() | Get route match | MvcEvent |
getRouter() | Get router | MvcEvent |
getTarget() | Get the event target | Event |
getViewModel() | Get the view model | MvcEvent |
isError() | Does the event represent an error response? | MvcEvent |
propagationIsStopped() | Is propagation stopped? | Event |
setApplication() | Set application instance | MvcEvent |
setController() | Set controller name | MvcEvent |
setControllerClass() | Set controller class | MvcEvent |
setError() | Set the error message (indicating error in handling request) | MvcEvent |
setName() | Set the event name | Event |
setParam() | Set an individual parameter to a value | Event |
setParams() | Set parameters | Event |
setRequest() | Set request | MvcEvent |
setResponse() | Set response | MvcEvent |
setResult() | Set result | MvcEvent |
setRouteMatch() | Set route match | MvcEvent |
setRouter() | Set router | MvcEvent |
setTarget() | Set the event target/context | Event |
setViewModel() | Set the view model | MvcEvent |
stopPropagation() | Stop further event propagation | Event |
Constructor
Accept a target and its parameters.
Parameter Name | Type | Description |
---|---|---|
$name | string | Event |
$target | string|object | |
$params | array|\ArrayAccess |
Returns:
Get application instance
Returns: \ApplicationInterface
Get the currently registered controller name
Returns: string
Get controller class
Returns: string
Retrieve the error message, if any
Returns: string
Get event name
Returns: string
Get an individual parameter
If the parameter does not exist, the $default value will be returned.
Parameter Name | Type | Description |
---|---|---|
$name | string|int | |
$default | mixed |
Returns: mixed
Get all parameters
Returns: array|object|\ArrayAccess
Get request
Returns: \Request
Get response
Returns: \Response
Get result
Returns: mixed
Get route match
Returns: null|\RouteMatch
Get router
Returns: \RouteStackInterface
Get the event target
This may be either an object, or the name of a static method.
Returns: string|object
Get the view model
Returns: \Model
Does the event represent an error response?
Returns: bool
Is propagation stopped?
Returns: bool
Set application instance
Parameter Name | Type | Description |
---|---|---|
$application | \ApplicationInterface |
Returns: \MvcEvent
Set controller name
Parameter Name | Type | Description |
---|---|---|
$name | string |
Returns: \MvcEvent
Set controller class
Parameter Name | Type | Description |
---|---|---|
$class | string |
Returns: \MvcEvent
Set the error message (indicating error in handling request)
Parameter Name | Type | Description |
---|---|---|
$message | string |
Returns: \MvcEvent
Set the event name
Parameter Name | Type | Description |
---|---|---|
$name | string |
Returns:
Set an individual parameter to a value
Parameter Name | Type | Description |
---|---|---|
$name | string|int | |
$value | mixed |
Returns:
Set parameters
Overwrites parameters
Parameter Name | Type | Description |
---|---|---|
$params | array|\ArrayAccess|object |
Returns:
Set request
Parameter Name | Type | Description |
---|---|---|
$request | \Request |
Returns: \MvcEvent
Set response
Parameter Name | Type | Description |
---|---|---|
$response | \Response |
Returns: \MvcEvent
Set result
Parameter Name | Type | Description |
---|---|---|
$result | mixed |
Returns: \MvcEvent
Set route match
Parameter Name | Type | Description |
---|---|---|
$matches | \RouteMatch |
Returns: \MvcEvent
Set router
Parameter Name | Type | Description |
---|---|---|
$router | \RouteStackInterface |
Returns: \MvcEvent
Set the event target/context
Parameter Name | Type | Description |
---|---|---|
$target | null|string|object |
Returns:
Set the view model
Parameter Name | Type | Description |
---|---|---|
$viewModel | \Model |
Returns: \MvcEvent
Stop further event propagation
Parameter Name | Type | Description |
---|---|---|
$flag | bool |
Returns: