You are on page 1of 1

Dispatch Process Overview

Zend_Controller_Front>dispatch() CreateStd.RequestObject Zend_Controller_Request_Http CreateStd.ResponseObject Zend_Controller_Response_Http Plugin Call:RouteStartup Standard:Zend_Controller_Router_Rewrite Also registered inPlugin Broker FindmatchingRoute (whichRoutematchesthe URL,LastInFirstOut Principle)

SetdefaultRoute (if notpresent)

Extract Module,Controller, Actionand Parametersfrom URL

WriteModule,Controller,Action andallParametersintothe RequestObject

Routing Zend_Controller_Dispatcher_Standard Plugin Call:RouteShutdown Zend_Controller_Action_HelperBroker>__construct() SetActionControllerInstanceinallActionHelpers (loop) CallInit()methods of allregisteredHelpers registeredinthe Broker

Plugin Call:dispatchLoopStartup do

ReadMethod and Actionfrom RequestObject

Zend_Controller_Action>dispatch() dsd Setdispatched =true inRequestObject CreateInstanceof the appropiate ActionController. Constructor of Zend_Controller_Action creates Zend_Controller_Action_HelperBroker. Helper Call:PreDispatch Plugin Call:preDispatch IsRequestObject reseted through apreDispatch Plugin? Yes Setdispatched =true inRequestObject CallpreDispatch() OutputinBuffer: ob_start()

ActionControllerDispatch Process

isDispatched()==true?

No

Plugin Call:postDispatch

CallActionController's dispatch()method
(Passesthe Nameof Actionto the Method)

Callof the ActionMethod

While RequestObject notdispatched (==false)

Writebuffered output to the Responseobject using appendBody()


Plugin Call:dispatchLoopShutdown Destroy ActionControllerObject

CallpostDispatch()

Helper Call:PostDispatch

Sendcollated content from ResponseObject

Plugin Call

Helper Call

Try CatchBlock

V1.01,Created by ThorstenRuf

You might also like