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. It then goes through the following steps:
The web server receives the request and Magento is instantiated by calling the bootstrap file,
Mage.php
.The frontend controller is instantiated and initialized; during this controller initialization Magento searches for the web routes and instantiates them.
Magento then iterates through each of the routers and calls the match. The
match
method is responsible for processing the URL and generating the corresponding controller and action.Magento then instantiates the matching controller...