Core

Magento Application Initialisation Part 1

Welcome to Magento Application Initialisation Part 1. Magento goes through a few steps to load the application. As with most PHP applications, the main entry point for Magento is an index.php file. Within index.php, a call to Magento’s Mage class’ run() method is made.
The run method exists in app/Mage.php.
There’s quite a bit of …

Magento Front Controller

The Magento front controller is first noticed in the Mage_Core_Model_App class. Specifically, the line below.
1. The first step is to initialise the Magento front controller using the _initFrontController() method. initFrontController() will then instantiate a new class of Mage_Core_Controller_Varien_Front. The init() method of this class is then called.
Note that the Mage_Core_Controller_Varien_Front class is the …

Magento Application Initialisation Part 2

Welcome to Magento Application Initialisation Part 2. This post continues on from Application Initialisation Part 1.
Th next method to look at is _initModules().
The first line that we should be looking at is $this->_config->loadModules().
So the first step is that we are sent to the _loadDeclaredModules() method which then makes a call to the …

Magento Factory Methods

Introduction to Magento Factory Methods
Using Magento Factory Methods within the application is easy to do and allows classes to be instantiated using the Factory Pattern. These factory methods are used to instantiate blocks, helpers and models. An example would be when Magento attempts load a product.
The snippet of code is used instead of …