1

I am get confused a little bit about the correct answer for this question, may be it is small.

One /app/code/core/Mage/Core/Model/App.php

 public function run($params)
{
 $this->baseInit($options);
 $this->_initModules();
 $this->loadAreaPart(Mage_Core_Model_App_Area::AREA_GLOBAL, Mage_Core_Model_App_Area::PART_EVENTS);
 if ($this->_config->isLocalConfigLoaded()) {
 $scopeCode = isset($params['scope_code']) ? $params['scope_code'] : '';
 $scopeType = isset($params['scope_type']) ? $params['scope_type'] : 'store';
 $this->_initCurrentStore($scopeCode, $scopeType);
 $this->_initRequest();
 Mage_Core_Model_Resource_Setup::applyAllDataUpdates();
 }
 $this->getFrontController()->dispatch();
 }
 return $this;
}

Base configuration as well as Module configuration is loading by below code when request something.

$this->_config->loadBase();
$this->_config->loadModules();
$this->_config->loadDb();

Two app/code/core/Mage/Core/Model/App.php

public function init($code, $type = null, $options = array())
{
 $this->_initEnvironment();
 $this->_config = Mage::getConfig();
 $this->_config->setOptions($options);
 $this->_initBaseConfig();
 $this->_initCache();
 $this->_config->init($options);
 if (Mage::isInstalled($options)) {
 $this->_initCurrentStore($code, $type);
 $this->_initRequest();
 }
 return $this;
}

It is calling when we call Stactic Method Mage::app(); initializing configuration and loading

Based on One and Two Config loading which is the correct answer for tagged (How and when does Magento load .... ) question ?

Any answer appreciate.

asked Feb 2, 2016 at 19:33

1 Answer 1

0

In Magento have three executing function (Mage::init(), Mage::app(), Mage::run()). But there are two main functions that usually use for executing, that is Mage::app(), Mage::run().

You can read this: http://vncosy.com/magento-what-is-the-difference-regarding-module-loading-between-magerun-and-mageapp/

answered Feb 4, 2016 at 8:55
1
  • cool answer , But what if get asked above question ( how and when does ... base configuration, the module configuration, and the database configuration? ) . Do I have to say Mage::app() or by the public function run(). Commented Feb 4, 2016 at 9:22

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.