PHP Class Zend\Mvc\MvcEvent

Inheritance: extends Zend\EventManager\Event
Show file Open project: zendframework/zend-mvc Class Usage Examples

Protected Properties

Property Type Description
$application
$request Zend\Stdlib\RequestInterface
$response Zend\Stdlib\ResponseInterface
$result mixed
$routeMatch null | Zend\Router\RouteMatch
$router Zend\Router\RouteStackInterface
$viewModel Zend\View\Model\ModelInterface

Public Methods

Method Description
getApplication ( ) : Zend\Mvc\ApplicationInterface Get application instance
getController ( ) : string Get the currently registered controller name
getControllerClass ( ) : string Get controller class
getError ( ) : string Retrieve the error message, if any
getRequest ( ) : Zend\Stdlib\RequestInterface Get request
getResponse ( ) : Zend\Stdlib\ResponseInterface Get response
getResult ( ) : mixed Get result
getRouteMatch ( ) : null | Zend\Router\RouteMatch Get route match
getRouter ( ) : Zend\Router\RouteStackInterface Get router
getViewModel ( ) : Zend\View\Model\ModelInterface Get the view model
isError ( ) : boolean Does the event represent an error response?
setApplication ( Zend\Mvc\ApplicationInterface $application ) : MvcEvent Set application instance
setController ( string $name ) : MvcEvent Set controller name
setControllerClass ( string $class ) : MvcEvent Set controller class
setError ( string $message ) : MvcEvent Set the error message (indicating error in handling request)
setRequest ( Zend\Stdlib\RequestInterface $request ) : MvcEvent Set request
setResponse ( Zend\Stdlib\ResponseInterface $response ) : MvcEvent Set response
setResult ( mixed $result ) : MvcEvent Set result
setRouteMatch ( Zend\Router\RouteMatch $matches ) : MvcEvent Set route match
setRouter ( Zend\Router\RouteStackInterface $router ) : MvcEvent Set router
setViewModel ( Zend\View\Model\ModelInterface $viewModel ) : MvcEvent Set the view model

Method Details

getApplication() public method

Get application instance
public getApplication ( ) : Zend\Mvc\ApplicationInterface
return Zend\Mvc\ApplicationInterface

getController() public method

Get the currently registered controller name
public getController ( ) : string
return string

getControllerClass() public method

Get controller class
public getControllerClass ( ) : string
return string

getError() public method

Retrieve the error message, if any
public getError ( ) : string
return string

getRequest() public method

Get request
public getRequest ( ) : Zend\Stdlib\RequestInterface
return Zend\Stdlib\RequestInterface

getResponse() public method

Get response
public getResponse ( ) : Zend\Stdlib\ResponseInterface
return Zend\Stdlib\ResponseInterface

getResult() public method

Get result
public getResult ( ) : mixed
return mixed

getRouteMatch() public method

Get route match
public getRouteMatch ( ) : null | Zend\Router\RouteMatch
return null | Zend\Router\RouteMatch

getRouter() public method

Get router
public getRouter ( ) : Zend\Router\RouteStackInterface
return Zend\Router\RouteStackInterface

getViewModel() public method

Get the view model
public getViewModel ( ) : Zend\View\Model\ModelInterface
return Zend\View\Model\ModelInterface

isError() public method

Does the event represent an error response?
public isError ( ) : boolean
return boolean

setApplication() public method

Set application instance
public setApplication ( Zend\Mvc\ApplicationInterface $application ) : MvcEvent
$application Zend\Mvc\ApplicationInterface
return MvcEvent

setController() public method

Set controller name
public setController ( string $name ) : MvcEvent
$name string
return MvcEvent

setControllerClass() public method

Set controller class
public setControllerClass ( string $class ) : MvcEvent
$class string
return MvcEvent

setError() public method

Set the error message (indicating error in handling request)
public setError ( string $message ) : MvcEvent
$message string
return MvcEvent

setRequest() public method

Set request
public setRequest ( Zend\Stdlib\RequestInterface $request ) : MvcEvent
$request Zend\Stdlib\RequestInterface
return MvcEvent

setResponse() public method

Set response
public setResponse ( Zend\Stdlib\ResponseInterface $response ) : MvcEvent
$response Zend\Stdlib\ResponseInterface
return MvcEvent

setResult() public method

Set result
public setResult ( mixed $result ) : MvcEvent
$result mixed
return MvcEvent

setRouteMatch() public method

Set route match
public setRouteMatch ( Zend\Router\RouteMatch $matches ) : MvcEvent
$matches Zend\Router\RouteMatch
return MvcEvent

setRouter() public method

Set router
public setRouter ( Zend\Router\RouteStackInterface $router ) : MvcEvent
$router Zend\Router\RouteStackInterface
return MvcEvent

setViewModel() public method

Set the view model
public setViewModel ( Zend\View\Model\ModelInterface $viewModel ) : MvcEvent
$viewModel Zend\View\Model\ModelInterface
return MvcEvent

Property Details

$application protected property

protected $application

$request protected property

protected RequestInterface,Zend\Stdlib $request
return Zend\Stdlib\RequestInterface

$response protected property

protected ResponseInterface,Zend\Stdlib $response
return Zend\Stdlib\ResponseInterface

$result protected property

protected mixed $result
return mixed

$routeMatch protected property

protected null|RouteMatch,Zend\Router $routeMatch
return null | Zend\Router\RouteMatch

$router protected property

protected RouteStackInterface,Zend\Router $router
return Zend\Router\RouteStackInterface

$viewModel protected property

protected ModelInterface,Zend\View\Model $viewModel
return Zend\View\Model\ModelInterface