SlideShare a Scribd company logo
1 of 6
Download to read offline
Zend Framework Basic Request Workflow Chart
                                                                                                                                          V 1.01, Created by Polley Wong
End User’s
 Browser




                       Request for a
                          page




                            URL
   public/index.php




                          Requires

                        application/
                       bootstrap.php
bootstrap.php




                                                                                       Register Custom Plugin
 application/




                                                                                          Initializer that runs
                                                                                         $this->initDb();
                                                                                                                                                       Runs
                                                                   Pass in
                      Configure include   Prepares Front                                 $this->initHelpers();       Pass in Optional Custom
                                                                 Environment
                            paths           Controller                                   $this->initView();           Request & Response
                                                                                                                                                  Front Controller
                                                           (development/staging/...)     $this->initPlugins();                Object
                                                                                                                                                     Dispatch
                                                                                         $this->initRoutes();
                                                                                         $this->initControllers();
Runs


Front Controller Dispatch Workflow Chart                                                                 Front Controller
                                                                                                            Dispatch
                                                                                                                                                                  V 1.01, Created by Polley Wong
 Front Controller




                                                                       Register
                      Instantiate            Instantiate            Request Object          Notify                                                  Notify
                    Default Request            Default                    and           Plugin Broker                                           Plugin Broker
                                                                                                                            Start Routing
                     Object if none      Response Object           Response Object            of                                                      of
                       provided          if none provided                 with          Router Startup                                        Router Completion
                                                                     Plugin Broker


                                                            No
                                                                                                                                                          No
 Plugin Broker




                                                                                                                                            More Plugins with
                       More Plugins with              Run Plugin’s                                                                                                         Run Plugin’s
                                              Yes                                                                                           routeShutdown()        Yes
                    routeStartup() method?           routeStartup()                                                                                                      routeShutdown()
                                                                                                                                                method?




                    Find a matching                                                Inject
                                               Extract Module,
 Router




                      route to the                                                returning
                                              Controller, Action
                        current                                                values to the
                                              and Parameters
                      PATH_INFO                                               Request Object
Runs


Front Controller Dispatch Workflow Chart                                                                 Front Controller
                                                                                                            Dispatch
                                                                                                                                                                   V 1.01, Created by Polley Wong

                                                                                                                                            Routing Process
 Front Controller




                                                                       Register
                      Instantiate            Instantiate            Request Object          Notify                                                   Notify
                    Default Request            Default                    and           Plugin Broker                                            Plugin Broker
                                                                                                                            Start Routing
                     Object if none      Response Object           Response Object            of                                                       of
                       provided          if none provided                 with          Router Startup                                         Router Completion                              cont.
                                                                     Plugin Broker


                                                            No
                                                                                                                                                          No
 Plugin Broker




                                                                                                                                             More Plugins with
                       More Plugins with              Run Plugin’s                                                                                                          Run Plugin’s
                                              Yes                                                                                            routeShutdown()        Yes
                    routeStartup() method?           routeStartup()                                                                                                       routeShutdown()
                                                                                                                                                 method?




                    Find a matching                                                 Inject
                                               Extract Module,
 Router




                      route to the                                                 returning
                                              Controller, Action
                        current                                                values to the
                                              and Parameters
                      PATH_INFO                                               Request Object
Front Controller Dispatch Workflow Chart
                                                                                                                                                                                      V 1.01, Created by Polley Wong

                                                                                                                               Yes

                                                                                                 Replace current Action
                                                       Replace current Action                             OR                                    Skip current action
 Front Controller




                                                                                                  Skip current action


                                                                                                                                                                 postDispatch Process
                    preDispatch Process
                                                                                                         Yes


                              Notify                    Set                     Notify                                                                                   Notify
                                                                                                         Did any                                 Action                                            Did any
                          Plugin Broker          Request Object'’s          Plugin Broker                                      Request Object                         Plugin Broker
                cont.                                                                             preDispatch() reset                           Controller                                  postDispatch() reset
                                of              “isDispatched Flag”               of                                      No:      and                                      of
                                                                                                  “isDispatched Flag”                           Dispatch                                    “isDispatched Flag”
                          Dispatch Loop                  to                   Dispatch                                        Response Object                           Dispatch
                                                                                                       to FALSE?                                Process                                          to FALSE?
                             Startup                   TRUE                    Startup                                                                                 Completion
                                                                                                                                                                                                                   cont.

                                                                                            No
                              Request
                                                                                                                                                                        Request
                               Object No                                        Request
                                                                                                                                                                         Object No
                                                                                 Object
 Plugin Broker




                          More Plugins with                                       More Plugins with                                                                    More Plugins with
                                                            Run Plugin’s                                       Run Plugin’s                                                                             Run Plugin’s
                        dispatchLoopStartup()   Yes                                preDispatch()        Yes                                                             postDispatch()         Yes
                                                       dispatchLoopStartup()                                   preDispatch()                                                                           postDispatch()
                               method?                                                method?                                                                             method?
Front Controller Dispatch Workflow Chart
                                                                                                                                                                                                                       V 1.01, Created by Polley Wong


                                                                                                                                                       Yes

                                                                                                                     Replace current Action
                                                                         Replace current Action                               OR                                                 Skip current action
                                                                                                                      Skip current action
    Front Controller




                                                                                                                                                                                                    postDispatch Process
                                preDispatch Process
                                                                                                                              Yes


                                           Notify                         Set                     Notify                                                                                                   Notify
                                                                                                                             Did any                                              Action                                               Did any
                                       Plugin Broker               Request Object'’s          Plugin Broker                                                                                            Plugin Broker
                                                                                                                                                        Request Object
                            cont.                                                                                      preDispatch() reset                                      Controller                                       postDispatch() reset
                                             of                   “isDispatched Flag”               of                                             No:      and                                              of
                                                                                                                       “isDispatched Flag”                                      Dispatch                                         “isDispatched Flag”
                                       Dispatch Loop                       to                   Dispatch                                               Response Object                                   Dispatch
                                                                                                                           to FALSE?                                             Process                                             to FALSE?
                                          Startup                        TRUE                    Startup                                                                                                Completion
                                                                                                                                                                                                                                                        cont.

                                                                                                              No
                                            Request
                                                                                                                                                                                                         Request
                                             Object No                                             Request
                                                                                                                                                                                                          Object No
                                                                                                    Object
    Plugin Broker




                                      More Plugins with                                              More Plugins with                                                                                  More Plugins with
                                                                              Run Plugin’s                                          Run Plugin’s                                                                                             Run Plugin’s
                                    dispatchLoopStartup()         Yes                                 preDispatch()         Yes                                                                          postDispatch()             Yes
                                                                         dispatchLoopStartup()                                      preDispatch()                                                                                           postDispatch()
                                           method?                                                      method?                                                                                             method?
    Controller Dispatcher




                                                                                                                                                                                                   FALSE                           Append buffered
                                                                                                                                                                                                                                     content into
                                                                                                                                                                                                                                  Response Object’s
                                                                                                                                                                            Call
                                                                                    Set                                                                                                                                      TRUE       body
                                                                                                                                                                    Action Controller’s
                                                          Rretrieve                                         Is parameter                                                                              Is parameter
                                                                             Request Object'’s
                                      Load
                                                                                                                                                                    dispatch() method
                                                        Action Method                                  disableOutputBuffering                   output buffer                                    disableOutputBuffering
                                                                            “isDispatched Flag”
                                    Controller                                                                                      TRUE
                                                                                                                                                                        (Passes the
                                                         Name from                                         TRUE (default)                           start                                            TRUE (default)
                                                                                     to
                                    class file
                                                                                                                                                                     Name of Action
                                                        Request Object                                       or FALSE?                                                                                 or FALSE?
                                                                                   TRUE                                                                                                                                                  Destroy Action
                                                                                                                                                                      to the method)
                                                                                                                                       FALSE                                                                                            Controller Object
 Controller




                                                                  Register                             Notify                                                 Is                                                                             Notify
  Action




                                                                                                                                 Run                                                                              Run
                                    Initialize Action         Action Controller                    Helper Broker                                        “isDispatched               Call of the                                          Helper Broker
                                                                                                                          Action Controller’s                                                              Action Controller’s
                                     Helper Broker                  with                                 of                                                Flag” ==               Action Method                                                of
                                                                                                                            preDispatch()                                                                   postDispatch()
                                                               Helper Broker                      Dispatch Startup                                         TRUE?                                                                      Dispatch Completion

                                                                                                                                                                                                                         No
                                                            No
 Action Helper




                                                                                                                              No

                                                                                                   Run
    Broker




                                                                          Run                                      More Helpers with                                                         More Helpers with
                                    More helper in                                           init() method                                          Run Helper’s                                                                  Run Helper’s
                                                                  setActionController()                             preDispatch()
                                                           Yes                                                                           Yes                                                  postDispatch()           Yes
                                       stack?                                                       in                                              preDispatch()                                                                postDispatch()
                                                                    method in helper                                   method?                                                                   method?
                                                                                                 helper
Front Controller Dispatch Workflow Chart
                                                                                                                                V 1.01, Created by Polley Wong




                                                               Return the
                                                             Response Object
  Front Controller




                                                                   Yes


                                    Notify
                                Plugin Broker
                                                            Is “returnResponse”
                                      of                                              sendResponse()
                                                             Flag set to TRUE?
                                Dispatch Loop
                     cont.
                                 Completion


                                   Request
                                    Object No
  Plugin Broker




                                 More Plugins with
                                                                   Run Plugin’s
                             dispatchLoopShutdown()   Yes
                                                             dispatchLoopShutdown()
                                     method?




                         postDispatch Process (cont.)
  Response Object




                                                                                                            Output Body
                                                                                      Send Headers
                                                                                                          (echo $content)
End User’s
 Browser




                                                                                                       Waiting for User Input

More Related Content

Viewers also liked (12)

1312- System of Wheat Intensification
1312- System of Wheat Intensification1312- System of Wheat Intensification
1312- System of Wheat Intensification
 
Web of Science: REST or SOAP?
Web of Science: REST or SOAP?Web of Science: REST or SOAP?
Web of Science: REST or SOAP?
 
Participatory extension method
Participatory extension methodParticipatory extension method
Participatory extension method
 
Changes Under Mao - Agriculture
Changes Under Mao - AgricultureChanges Under Mao - Agriculture
Changes Under Mao - Agriculture
 
Kisan Call Center
Kisan Call Center Kisan Call Center
Kisan Call Center
 
Smart farming using ARDUINO (Nirma University)
Smart farming using ARDUINO (Nirma University)Smart farming using ARDUINO (Nirma University)
Smart farming using ARDUINO (Nirma University)
 
Final ppt
Final pptFinal ppt
Final ppt
 
Pra presentation
Pra presentationPra presentation
Pra presentation
 
Individual contact method in Extension Education
Individual contact method in Extension EducationIndividual contact method in Extension Education
Individual contact method in Extension Education
 
Fundamental of Extension Methods: Tools and Techniques of PRA
Fundamental of Extension Methods:  Tools and Techniques of PRAFundamental of Extension Methods:  Tools and Techniques of PRA
Fundamental of Extension Methods: Tools and Techniques of PRA
 
Presentation on PRA & PLA Process
Presentation on PRA & PLA ProcessPresentation on PRA & PLA Process
Presentation on PRA & PLA Process
 
Interpretation of histograms
Interpretation of histogramsInterpretation of histograms
Interpretation of histograms
 

Recently uploaded

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Recently uploaded (20)

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

Zend Framework Dispatch Workflow (v1.01)

  • 1. Zend Framework Basic Request Workflow Chart V 1.01, Created by Polley Wong End User’s Browser Request for a page URL public/index.php Requires application/ bootstrap.php bootstrap.php Register Custom Plugin application/ Initializer that runs $this->initDb(); Runs Pass in Configure include Prepares Front $this->initHelpers(); Pass in Optional Custom Environment paths Controller $this->initView(); Request & Response Front Controller (development/staging/...) $this->initPlugins(); Object Dispatch $this->initRoutes(); $this->initControllers();
  • 2. Runs Front Controller Dispatch Workflow Chart Front Controller Dispatch V 1.01, Created by Polley Wong Front Controller Register Instantiate Instantiate Request Object Notify Notify Default Request Default and Plugin Broker Plugin Broker Start Routing Object if none Response Object Response Object of of provided if none provided with Router Startup Router Completion Plugin Broker No No Plugin Broker More Plugins with More Plugins with Run Plugin’s Run Plugin’s Yes routeShutdown() Yes routeStartup() method? routeStartup() routeShutdown() method? Find a matching Inject Extract Module, Router route to the returning Controller, Action current values to the and Parameters PATH_INFO Request Object
  • 3. Runs Front Controller Dispatch Workflow Chart Front Controller Dispatch V 1.01, Created by Polley Wong Routing Process Front Controller Register Instantiate Instantiate Request Object Notify Notify Default Request Default and Plugin Broker Plugin Broker Start Routing Object if none Response Object Response Object of of provided if none provided with Router Startup Router Completion cont. Plugin Broker No No Plugin Broker More Plugins with More Plugins with Run Plugin’s Run Plugin’s Yes routeShutdown() Yes routeStartup() method? routeStartup() routeShutdown() method? Find a matching Inject Extract Module, Router route to the returning Controller, Action current values to the and Parameters PATH_INFO Request Object
  • 4. Front Controller Dispatch Workflow Chart V 1.01, Created by Polley Wong Yes Replace current Action Replace current Action OR Skip current action Front Controller Skip current action postDispatch Process preDispatch Process Yes Notify Set Notify Notify Did any Action Did any Plugin Broker Request Object'’s Plugin Broker Request Object Plugin Broker cont. preDispatch() reset Controller postDispatch() reset of “isDispatched Flag” of No: and of “isDispatched Flag” Dispatch “isDispatched Flag” Dispatch Loop to Dispatch Response Object Dispatch to FALSE? Process to FALSE? Startup TRUE Startup Completion cont. No Request Request Object No Request Object No Object Plugin Broker More Plugins with More Plugins with More Plugins with Run Plugin’s Run Plugin’s Run Plugin’s dispatchLoopStartup() Yes preDispatch() Yes postDispatch() Yes dispatchLoopStartup() preDispatch() postDispatch() method? method? method?
  • 5. Front Controller Dispatch Workflow Chart V 1.01, Created by Polley Wong Yes Replace current Action Replace current Action OR Skip current action Skip current action Front Controller postDispatch Process preDispatch Process Yes Notify Set Notify Notify Did any Action Did any Plugin Broker Request Object'’s Plugin Broker Plugin Broker Request Object cont. preDispatch() reset Controller postDispatch() reset of “isDispatched Flag” of No: and of “isDispatched Flag” Dispatch “isDispatched Flag” Dispatch Loop to Dispatch Response Object Dispatch to FALSE? Process to FALSE? Startup TRUE Startup Completion cont. No Request Request Object No Request Object No Object Plugin Broker More Plugins with More Plugins with More Plugins with Run Plugin’s Run Plugin’s Run Plugin’s dispatchLoopStartup() Yes preDispatch() Yes postDispatch() Yes dispatchLoopStartup() preDispatch() postDispatch() method? method? method? Controller Dispatcher FALSE Append buffered content into Response Object’s Call Set TRUE body Action Controller’s Rretrieve Is parameter Is parameter Request Object'’s Load dispatch() method Action Method disableOutputBuffering output buffer disableOutputBuffering “isDispatched Flag” Controller TRUE (Passes the Name from TRUE (default) start TRUE (default) to class file Name of Action Request Object or FALSE? or FALSE? TRUE Destroy Action to the method) FALSE Controller Object Controller Register Notify Is Notify Action Run Run Initialize Action Action Controller Helper Broker “isDispatched Call of the Helper Broker Action Controller’s Action Controller’s Helper Broker with of Flag” == Action Method of preDispatch() postDispatch() Helper Broker Dispatch Startup TRUE? Dispatch Completion No No Action Helper No Run Broker Run More Helpers with More Helpers with More helper in init() method Run Helper’s Run Helper’s setActionController() preDispatch() Yes Yes postDispatch() Yes stack? in preDispatch() postDispatch() method in helper method? method? helper
  • 6. Front Controller Dispatch Workflow Chart V 1.01, Created by Polley Wong Return the Response Object Front Controller Yes Notify Plugin Broker Is “returnResponse” of sendResponse() Flag set to TRUE? Dispatch Loop cont. Completion Request Object No Plugin Broker More Plugins with Run Plugin’s dispatchLoopShutdown() Yes dispatchLoopShutdown() method? postDispatch Process (cont.) Response Object Output Body Send Headers (echo $content) End User’s Browser Waiting for User Input