Dispatch Process Overview

fishhookFladgeInternet και Εφαρμογές Web

13 Δεκ 2013 (πριν από 3 χρόνια και 11 μήνες)

106 εμφανίσεις

dsd
PluginCall: Route Startup
Routing
Create Std. Response Object
Zend_Controller_Response_Http
Create Std. Request Object
Zend_Controller_Request_Http
Also 
registered 
in Plugin
Broker
PluginCall: Route Shutdown
PluginCall: dispatchLoopStartup
Send collatedcontentfromResponse Object
PluginCall: dispatchLoopShutdown
PluginCall: postDispatch
WhileRequest Objectnot dispatched( == false)
do
Set  dispatched= truein Request Object
PluginCall: preDispatch
Is Request Objectresetedthrougha preDispatch
Plugin?
Yes
Action Controller DispatchProcess
PluginCall
Read MethodandAction fromRequest Object
Create Instance oftheappropiateAction Controller. 
ConstructorofZend_Controller_Actioncreates
Zend_Controller_Action_HelperBroker.
Set dispatched= truein Request Object
Call Action Controller'sdispatch() method
(Passes theName ofAction totheMethod)
Output in Buffer: 
ob_start()
Write bufferedoutputtotheResponse object
usingappendBody()
DestroyAction Controller Object
Zend_Controller_Dispatcher_Standard
Zend_Controller_Front‐>dispatch()
HelperCall: PreDispatch
HelperCall: PostDispatch
Call preDispatch() 
isDispatched() ==  true?
No
Call oftheAction Method
Call postDispatch() 
HelperCall
V 1.01, CreatedbyThorsten Ruf
Zend_Controller_Action‐>dispatch()
Set ‚default‘ Route 
(ifnot present)
ExtractModule, Controller, 
Action andParameters fromURL
Standard: Zend_Controller_Router_Rewrite
Find matching Route 
(which Route matches the 
URL,  Last‐In‐First‐Out 
Principle)
Write Module, Controller, Action 
and all Parameters into the 
Request Object
Set Action Controller Instance in all Action Helpers(loop)
Zend_Controller_Action_HelperBroker‐>__construct()
Call Init() methodsofall registered Helpers
registered in theBroker
Try –Catch Block
DispatchProcessOverview