本文整理汇总了PHP中Mage_Core_Model_Config::loadBase方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Config::loadBase方法的具体用法?PHP Mage_Core_Model_Config::loadBase怎么用?PHP Mage_Core_Model_Config::loadBase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Config
的用法示例。
在下文中一共展示了Mage_Core_Model_Config::loadBase方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Class constructor
*/
public function __construct()
{
$this->_config = new Mage_Core_Model_Config(new Magento_ObjectManager_Zend());
$this->_config->loadBase();
$this->_config->loadModules();
$this->_initCommonDependencies();
}
示例2: _loadSecondConfig
protected function _loadSecondConfig()
{
$config = new \Mage_Core_Model_Config();
$config->loadBase();
//get app/etc
$this->_secondConfig = \Mage::getConfig()->loadModulesConfiguration('config.xml', $config);
}
示例3: testLoadBaseLocalConfig
/**
* @param string $etcDir
* @param string $option
* @param string $expectedNode
* @param string $expectedValue
* @dataProvider loadBaseLocalConfigDataProvider
*/
public function testLoadBaseLocalConfig($etcDir, $option, $expectedNode, $expectedValue)
{
$model = new Mage_Core_Model_Config();
$model->setOptions(array('etc_dir' => __DIR__ . "/_files/local_config/{$etcDir}", 'local_config' => $option));
$model->loadBase();
$this->assertInstanceOf('Varien_Simplexml_Element', $model->getNode($expectedNode));
$this->assertEquals($expectedValue, (string) $model->getNode($expectedNode));
}
示例4: _initBaseConfig
/**
* Initialize base system configuration (local.xml and config.xml files).
* Base configuration provide ability initialize DB connection and cache backend
*
* @return Mage_Core_Model_App
*/
protected function _initBaseConfig()
{
Varien_Profiler::start('mage::app::init::system_config');
$this->_config->loadBase();
Varien_Profiler::stop('mage::app::init::system_config');
return $this;
}
示例5: loadBase
/**
* Loads additional configuration for unit tests
* (non-PHPdoc)
* @see Mage_Core_Model_Config::loadBase()
*/
public function loadBase()
{
parent::loadBase();
$this->_loadTestCacheConfig();
return $this;
}
示例6: _initBaseConfig
/**
* Initialize base system configuration (local.xml and config.xml files).
* Base configuration provide ability initialize DB connection and cache backend
*
* @return Mage_Core_Model_App
*/
protected function _initBaseConfig()
{
Varien_Profiler::start('mage::app::init::system_config');
$this->_config->loadBase();
// /* Read DB connection config from environment variables */
// $connection1 = $this->_config;
// $connection = $this->_config->getNode('global/resources/default_setup/connection');
// $connection->setNode('host', $_ENV['DB_HOST']);
// $connection->setNode('username', $_ENV['DB_USERNAME']);
// $connection->setNode('password', $_ENV['DB_PASSWORD']);
// $connection->setNode('dbname', $_ENV['DB_NAME']);
//
//// var_dump($connection);
//// die();
Varien_Profiler::stop('mage::app::init::system_config');
return $this;
// Varien_Profiler::start('mage::app::init::system_config');
// $this->_config->loadBase();
//
// /* Read DB connection config from environment variables */
// $this->_config->getNode('global/resources/default_setup/connection')
// ->setNode('host', $_ENV['DB_HOST'])
// ->setNode('username', $_ENV['DB_USERNAME'])
// ->setNode('password', $_ENV['DB_PASSWORD']);
//
// Varien_Profiler::stop('mage::app::init::system_config');
// return $this;
}
示例7: _initBaseConfig
/**
* Initialize base system configuration (local.xml and config.xml files).
* Base configuration provide ability initialize DB connection and cache backend
*
* @return Mage_Core_Model_App
*/
protected function _initBaseConfig()
{
Magento_Profiler::start('init_system_config');
$this->_config->loadBase();
Magento_Profiler::stop('init_system_config');
return $this;
}