Zend\Mvc\MvcEvent
Synopsis
class MvcEvent
extends Event
{
- // constants
- const EVENT_BOOTSTRAP = 'bootstrap';
- const EVENT_DISPATCH = 'dispatch';
- const EVENT_DISPATCH_ERROR = 'dispatch.error';
- const EVENT_FINISH = 'finish';
- const EVENT_RENDER = 'render';
- const EVENT_RENDER_ERROR = 'render.error';
- const EVENT_ROUTE = 'route';
- // members
- protected $application;
- protected RequestInterface $request;
- protected ResponseInterface $response;
- protected mixed $result;
- protected RouteStackInterface $router;
- protected RouteMatch $routeMatch;
- protected ModelInterface $viewModel;
- // Inherited members from Event
- protected string $name;
- protected string|object $target;
- protected array|ArrayAccess|object $params;
- protected bool $stopPropagation;
- // methods
- public MvcEvent setApplication()
- public ApplicationInterface getApplication()
- public RouteStackInterface getRouter()
- public MvcEvent setRouter()
- public RouteMatch getRouteMatch()
- public MvcEvent setRouteMatch()
- public RequestInterface getRequest()
- public MvcEvent setRequest()
- public ResponseInterface getResponse()
- public MvcEvent setResponse()
- public MvcEvent setViewModel()
- public ModelInterface getViewModel()
- public mixed getResult()
- public MvcEvent setResult()
- public bool isError()
- public MvcEvent setError()
- public string getError()
- public string getController()
- public MvcEvent setController()
- public string getControllerClass()
- public MvcEvent setControllerClass()
- // Inherited methods from Event
- public void __construct()
- public string getName()
- public string|object getTarget()
- public Event setParams()
- public array|object|ArrayAccess getParams()
- public mixed getParam()
- public Event setName()
- public Event setTarget()
- public Event setParam()
- public void stopPropagation()
- public bool propagationIsStopped()
Hierarchy
Extends
Constants
Name | Value |
---|---|
EVENT_BOOTSTRAP | 'bootstrap' |
EVENT_DISPATCH | 'dispatch' |
EVENT_DISPATCH_ERROR | 'dispatch.error' |
EVENT_FINISH | 'finish' |
EVENT_RENDER | 'render' |
EVENT_RENDER_ERROR | 'render.error' |
EVENT_ROUTE | 'route' |
Members
protected
- $application
- $name — string
- $params — Zend\EventManager\array|ArrayAccess|object
- $request — Zend\Stdlib\RequestInterface
- $response — Zend\Stdlib\ResponseInterface
- $result — mixed
- $routeMatch — Zend\Mvc\Router\RouteMatch
- $router — Zend\Mvc\Router\RouteStackInterface
- $stopPropagation — Zend\EventManager\bool
- $target — Zend\EventManager\string|object
- $viewModel — Zend\View\Model\ModelInterface
Methods
public
- getApplication() — Get application instance
- getController() — Get the currently registered controller name
- getControllerClass() — Get controller class
- getError() — Retrieve the error message, if any
- getRequest() — Get request
- getResponse() — Get response
- getResult() — Get result
- getRouteMatch() — Get route match
- getRouter() — Get router
- getViewModel() — Get the view model
- isError() — Does the event represent an error response?
- setApplication() — Set application instance
- setController() — Set controller name
- setControllerClass() — Set controller class
- setError() — Set the error message (indicating error in handling request)
- setRequest() — Set request
- setResponse() — Set response
- setResult() — Set result
- setRouteMatch() — Set route match
- setRouter() — Set router
- setViewModel() — Set the view model
Inherited from Zend\EventManager\Event
public
- getName() — Get event name
- getParam() — Get an individual parameter
- getParams() — Get all parameters
- getTarget() — Get the event target
- propagationIsStopped() — Is propagation stopped?
- setName() — Set the event name
- setParam() — Set an individual parameter to a value
- setParams() — Set parameters
- setTarget() — Set the event target/context
- stopPropagation() — Stop further event propagation