Routing and request flow

Before going into more detail about the different components that form a part of Magento, it is important that we understand how these components interact together and how Magento processes requests coming from the web server.

As with any other PHP application, we have a single file as an entry point for every request. In the case of Magento, this file is index.php, which is in charge of loading the Mage.php Bootstrap class and starting the request cycle.

  1. The web server receives the request and Magento is instantiated by calling the Bootstrap file Mage.php.
  2. The frontend controller is instantiated and initialized. During this controller initialization, Magento searches for the web routes and instantiates them.
  3. Magento then ...

Get Magento PHP Developer's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.