当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Core_Model_Config_Base::__construct方法代码示例

本文整理汇总了PHP中Mage_Core_Model_Config_Base::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Config_Base::__construct方法的具体用法?PHP Mage_Core_Model_Config_Base::__construct怎么用?PHP Mage_Core_Model_Config_Base::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Core_Model_Config_Base的用法示例。


在下文中一共展示了Mage_Core_Model_Config_Base::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($sourceData = null)
 {
     $this->setCacheId('config_urapidflow');
     $this->setCacheTags(array(self::CACHE_TAG));
     $this->setCacheChecksum(null);
     parent::__construct($sourceData);
     $this->_construct();
 }
开发者ID:AleksNesh,项目名称:pandora,代码行数:8,代码来源:Config.php

示例2: __construct

 public function __construct($arg)
 {
     list($sourceData, $moduleName) = $arg;
     parent::__construct($sourceData);
     $this->_config = Mage::getConfig();
     $this->_moduleName = $moduleName;
     $this->_moduleDir = realpath(Mage::getModuleDir('', $moduleName));
     $this->_etcModuleDir = realpath(Mage::getModuleDir('etc', $moduleName));
 }
开发者ID:ThomasNegeli,项目名称:Compatibility,代码行数:9,代码来源:Module.php

示例3: __construct

 public function __construct()
 {
     error_reporting(E_ALL & ~E_NOTICE);
     // We have no interest in supporting notice based errors. Just turn them off.
     // grab the nodes with the connection information
     $foreignNode = Mage::getConfig()->getNode('global/resources/pap_foreign/connection');
     // grab the connection information from the store config
     $host = Mage::getStoreConfig('pap_config/connection/host');
     $username = Mage::getStoreConfig('pap_config/connection/username');
     $password = Mage::getStoreConfig('pap_config/connection/password');
     $dbname = Mage::getStoreConfig('pap_config/connection/dbname');
     // also get API information
     $this->apiusername = Mage::getStoreConfig('pap_config/api/username');
     $this->apipassword = Mage::getStoreConfig('pap_config/api/password');
     // update the configuration information in memory from the store configuration
     // We have to do this so that when things attempt to connect to a database,
     // the right database can be found and connected to
     $foreignNode->setNode('host', $host);
     $foreignNode->setNode('username', $username);
     $foreignNode->setNode('password', $password);
     $foreignNode->setNode('dbname', $dbname);
     // remember whether we have enough information to connect
     $this->dbconfigured = $host && $username && $password && $dbname;
     $this->configured = $this->apiusername && $this->apipassword;
     if ($this->dbconfigured && !$this->configured) {
         // we have the old DB information, but not the new password information.
         // The module was rewritten to use the API (which requires a PAP username
         // and password, rather than database access.)
         // Try to get an admin password from the DB.
         $foreignConnection = Mage::getSingleton('core/resource')->getConnection('pap_foreign');
         try {
             if ($mercaccount = $foreignConnection->fetchRow("SELECT au.username AS username, au.rpassword AS password FROM qu_g_authusers AS au INNER JOIN qu_g_users AS u ON au.authid = u.authid WHERE u.roleid = 'pap_merc'")) {
                 // we found the first merchant account. remember the username and password.
                 $this->apiusername = $mercaccount['username'];
                 $this->apipassword = $mercaccount['password'];
                 // recalculate the "configured" value.
                 $this->configured = $this->apiusername && $this->apipassword;
                 // save off the username and password so we don't have to recalculate again.
                 Mage::getConfig()->saveConfig('pap_config/api/username', $this->apiusername);
                 Mage::getConfig()->saveConfig('pap_config/api/password', $this->apipassword);
             }
         } catch (Exception $e) {
             // Something bad happened. I guess we won't be able to update this automatically.
         }
     }
     parent::__construct(Mage::getConfig()->getNode('global'));
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:47,代码来源:Config.php

示例4: array

 /**
  * Constructor
  *
  * Loading of custom configuration files
  * from different modules
  *
  * @param string $sourceData
  */
 function __construct($sourceData = null)
 {
     $tags = array(self::CACHE_TAG);
     $useCache = Mage::app()->useCache(self::CACHE_TAG);
     $this->setCacheId(self::CACHE_KEY);
     $this->setCacheTags($tags);
     if ($useCache && ($cache = Mage::app()->loadCache(self::CACHE_KEY))) {
         parent::__construct($cache);
     } else {
         parent::__construct(self::CONFIG_TEMPLATE);
         Mage::getConfig()->loadModulesConfiguration(self::CONFIG_FILENAME, $this);
         if ($useCache) {
             $xmlString = $this->getXmlString();
             Mage::app()->saveCache($xmlString, self::CACHE_KEY, $tags);
         }
     }
 }
开发者ID:james-hickman-arc,项目名称:magento-w2p,代码行数:25,代码来源:Config.php

示例5: __construct

 /**
  * Constructor.
  * Load configuration from enabled modules with appropriate caching.
  *
  * @param Varien_Simplexml_Element|string|null $data
  */
 public function __construct($data = null)
 {
     parent::__construct($data);
     $canUseCache = Mage::app()->useCache('config');
     if ($canUseCache) {
         /* Setup caching with no checksum validation */
         $this->setCache(Mage::app()->getCache())->setCacheChecksum(null)->setCacheId('fieldset_config')->setCacheTags(array(Mage_Core_Model_Config::CACHE_TAG));
         if ($this->loadCache()) {
             return;
         }
     }
     $config = Mage::getConfig()->loadModulesConfiguration('fieldset.xml');
     $this->setXml($config->getNode());
     if ($canUseCache) {
         $this->saveCache();
     }
 }
开发者ID:nemphys,项目名称:magento2,代码行数:23,代码来源:Fieldset.php

示例6:

 function __construct($sourceData = null)
 {
     parent::__construct($sourceData);
 }
开发者ID:hyhoocchan,项目名称:mage-local,代码行数:4,代码来源:System.php

示例7: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct(Mage::getConfig()->getNode('global/sales/order'));
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:7,代码来源:Config.php

示例8: __construct

 /**
  * Class construct
  *
  * @param mixed $sourceData
  */
 public function __construct($sourceData = null)
 {
     $this->setCacheId('config_global');
     parent::__construct($sourceData);
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:10,代码来源:Config.php

示例9: __construct

 /**
  * Class construct
  *
  * @param Magento_ObjectManager $objectManager
  * @param mixed $sourceData
  */
 public function __construct(Magento_ObjectManager $objectManager, $sourceData = null)
 {
     $this->_objectManager = $objectManager;
     $this->setCacheId('config_global');
     $options = $sourceData;
     if (!is_array($options)) {
         $options = array($options);
     }
     $this->_options = $this->_objectManager->create('Mage_Core_Model_Config_Options', array('data' => $options));
     $this->_prototype = $this->_objectManager->create('Mage_Core_Model_Config_Base');
     $this->_prototype->loadString('<config/>');
     $this->_cacheChecksum = null;
     parent::__construct($sourceData);
 }
开发者ID:natxetee,项目名称:magento2,代码行数:20,代码来源:Config.php

示例10: __construct

 public function __construct()
 {
     parent::__construct(Mage::getConfig()->getNode('global/customer/address'));
 }
开发者ID:arslbbt,项目名称:mangentovies,代码行数:4,代码来源:Config.php

示例11: __construct

 public function __construct($sourceData = null)
 {
     parent::__construct($sourceData = null);
     $this->_magento2config = new Mage_Core_Model_Config_Base();
 }
开发者ID:ThomasNegeli,项目名称:Compatibility,代码行数:5,代码来源:Modules.php

示例12: __construct

 public function __construct()
 {
     parent::__construct(AO::getConfig()->getNode('global/sales/order_creditmemo'));
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:4,代码来源:Order_Creditmemo_Config.php

示例13: __construct

 /**
  * Class construct
  *
  * @param mixed $sourceData
  */
 public function __construct($sourceData = null)
 {
     $this->setCacheId('config_global');
     $this->_options = new Mage_Core_Model_Config_Options();
     parent::__construct($sourceData);
 }
开发者ID:jauderho,项目名称:magento-mirror,代码行数:11,代码来源:Config.php

示例14: __construct

 /**
  * Define node
  *
  */
 public function __construct()
 {
     parent::__construct(Mage::getConfig()->getNode()->global->customer->address);
 }
开发者ID:cnglobal-sl,项目名称:caterez,代码行数:8,代码来源:Config.php

示例15: __construct

 /**
  * Class construct
  *
  * @param mixed $sourceData
  */
 public function __construct($sourceData = null)
 {
     $this->setCacheId('config_global');
     $this->_options = new Mage_Core_Model_Config_Options($sourceData);
     $this->_prototype = new Mage_Core_Model_Config_Base();
     $this->_cacheChecksum = null;
     parent::__construct($sourceData);
 }
开发者ID:par-orillonsoft,项目名称:Magento,代码行数:13,代码来源:Config.php


注:本文中的Mage_Core_Model_Config_Base::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。