Class MiddlewareController

Summary

Fully Qualified Name: Zend\Mvc\Controller\MiddlewareController
Extends: AbstractController

Description

Methods

Name Description Defined By
__call() Method overloading: return/call plugins AbstractController
__construct() MiddlewareController
dispatch() Dispatch a request AbstractController
getEvent() Get the attached event AbstractController
getEventManager() Retrieve the event manager AbstractController
getMethodFromAction() Transform an "action" token into a method name AbstractController
getPluginManager() Get plugin manager AbstractController
getRequest() Get request object AbstractController
getResponse() Get response object AbstractController
onDispatch() {@inheritDoc} MiddlewareController
plugin() Get plugin instance AbstractController
setEvent() Set an event to use during dispatch AbstractController
setEventManager() Set the event manager instance used by this context AbstractController
setPluginManager() Set plugin manager AbstractController

Method Details

__call()

Method overloading: return/call plugins

If the plugin is a functor, call it, passing the parameters provided. Otherwise, return the plugin instance.

Parameter Name Type Description
$method string
$params array

Returns: mixed

__construct()

Parameter Name Type Description
$pipe
$responsePrototype
$eventManager
$event

Returns: void

dispatch()

Dispatch a request

Parameter Name Type Description
$request \Request
$response null|\Response

Returns: \Response|mixed

getEvent()

Get the attached event

Will create a new MvcEvent if none provided.

Returns: \MvcEvent

getEventManager()

Retrieve the event manager

Lazy-loads an EventManager instance if none registered.

Returns: \EventManagerInterface

getMethodFromAction()

Transform an "action" token into a method name

Parameter Name Type Description
$action string

Returns: string

getPluginManager()

Get plugin manager

Returns: \PluginManager

getRequest()

Get request object

Returns: \Request

getResponse()

Get response object

Returns: \Response

onDispatch()

{@inheritDoc}

Parameter Name Type Description
$e

Returns:

plugin()

Get plugin instance

Parameter Name Type Description
$name string Name
$options null|array Options

Returns: mixed

setEvent()

Set an event to use during dispatch

By default, will re-cast to MvcEvent if another event type is provided.

Parameter Name Type Description
$e \Event

Returns: void

setEventManager()

Set the event manager instance used by this context

Parameter Name Type Description
$events \EventManagerInterface

Returns: \AbstractController

setPluginManager()

Set plugin manager

Parameter Name Type Description
$plugins \PluginManager

Returns: \AbstractController

Top