當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Varien_Simplexml_Config::__construct方法代碼示例

本文整理匯總了PHP中Varien_Simplexml_Config::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Varien_Simplexml_Config::__construct方法的具體用法?PHP Varien_Simplexml_Config::__construct怎麽用?PHP Varien_Simplexml_Config::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Varien_Simplexml_Config的用法示例。


在下文中一共展示了Varien_Simplexml_Config::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Constructor
  *
  * @see Varien_Simplexml_Config
  */
 public function __construct($sourceData = null)
 {
     $this->setCacheId('config_api');
     $this->setCacheTags(array(self::CACHE_TAG));
     parent::__construct($sourceData);
     $this->_construct();
 }
開發者ID:ronseigel,項目名稱:agent-ohm,代碼行數:12,代碼來源:Config.php

示例2: __construct

 /**
  * Class constructor
  *
  * @param array $data
  */
 public function __construct($data = array())
 {
     $this->_elementClass = Mage::getConfig()->getModelClassName('core/layout_element');
     $this->setXml(simplexml_load_string('<layout/>', $this->_elementClass));
     $this->_update = Mage::getModel('core/layout_update');
     parent::__construct($data);
 }
開發者ID:hazaeluz,項目名稱:magento_connect,代碼行數:12,代碼來源:Layout.php

示例3: __construct

 /**
  * Load config from merged adminhtml.xml files
  */
 public function __construct()
 {
     parent::__construct();
     $this->setCacheId('adminhtml_acl_menu_config');
     /* @var $adminhtmlConfig Varien_Simplexml_Config */
     $adminhtmlConfig = Mage::app()->loadCache($this->getCacheId());
     if ($adminhtmlConfig) {
         $this->_adminhtmlConfig = new Varien_Simplexml_Config($adminhtmlConfig);
     } else {
         $adminhtmlConfig = new Varien_Simplexml_Config();
         $adminhtmlConfig->loadString('<?xml version="1.0"?><config></config>');
         Mage::getConfig()->loadModulesConfiguration('adminhtml.xml', $adminhtmlConfig);
         $this->_adminhtmlConfig = $adminhtmlConfig;
         /**
          * @deprecated after 1.4.0.0-alpha2
          * support backwards compatibility with config.xml
          */
         $aclConfig = Mage::getConfig()->getNode('adminhtml/acl');
         if ($aclConfig) {
             $adminhtmlConfig->getNode()->extendChild($aclConfig, true);
         }
         $menuConfig = Mage::getConfig()->getNode('adminhtml/menu');
         if ($menuConfig) {
             $adminhtmlConfig->getNode()->extendChild($menuConfig, true);
         }
         if (Mage::app()->useCache('config')) {
             Mage::app()->saveCache($adminhtmlConfig->getXmlString(), $this->getCacheId(), array(Mage_Core_Model_Config::CACHE_TAG));
         }
     }
 }
開發者ID:blazeriaz,項目名稱:youguess,代碼行數:33,代碼來源:Config.php

示例4: __construct

 public function __construct($data = null)
 {
     parent::__construct($data);
     $cacheConfig = Mage::getConfig()->loadModulesConfiguration('cache.xml');
     $customConfig = Mage::getConfig()->loadModulesConfiguration('custom.xml');
     $cacheConfig->extend($customConfig);
     $this->setXml($cacheConfig->getNode());
     return $this;
 }
開發者ID:vinayshuklasourcefuse,項目名稱:sareez,代碼行數:9,代碼來源:Mirasvit_Fpc_Model_Config.php

示例5: __construct

 public function __construct($sourceData = null)
 {
     $this->_elementClass = 'Mage_Api_Model_Wsdl_Config_Element';
     // remove wsdl parameter from query
     $queryParams = Mage::app()->getRequest()->getQuery();
     unset($queryParams['wsdl']);
     // set up default WSDL template variables
     $this->_wsdlVariables = new Varien_Object(array('name' => 'Magento', 'url' => htmlspecialchars(Mage::getUrl('*/*/*', array('_query' => $queryParams)))));
     parent::__construct($sourceData);
 }
開發者ID:cewolf2002,項目名稱:magento,代碼行數:10,代碼來源:Base.php

示例6: __construct

 /**
  * Constructor
  * Initializes XML for this configuration
  * Local cache configuration
  *
  * @param string|Varien_Simplexml_Element|null $sourceData
  */
 public function __construct($sourceData = null)
 {
     parent::__construct($sourceData);
     $canUserCache = Mage::app()->useCache('config');
     if ($canUserCache) {
         $this->setCacheId(self::CACHE_ID)->setCacheTags(array(self::CACHE_TAG))->setCacheChecksum(null)->setCache(Mage::app()->getCache());
         if ($this->loadCache()) {
             return;
         }
     }
     // Load data of config files api2.xml
     $config = Mage::getConfig()->loadModulesConfiguration('api2.xml');
     $this->setXml($config->getNode('api2'));
     if ($canUserCache) {
         $this->saveCache();
     }
 }
開發者ID:ravi2jdesign,項目名稱:solvingmagento_1.7.0,代碼行數:24,代碼來源:Config.php

示例7: __construct

 /**
  * Load cache on instantiation
  *
  * @param null|string|Varien_Simplexml_Element $sourceData
  */
 public function __construct($sourceData = null)
 {
     $this->setCacheId(self::CACHE_KEY);
     $this->setCacheTags(array(self::CACHE_TAG));
     parent::__construct($sourceData);
     if (Mage::app()->useCache(self::CACHE_KEY)) {
         $this->setCache(Mage::app()->getCache());
         if ($this->loadCache()) {
             return;
         }
     }
     $config = Mage::getConfig()->loadModulesConfiguration('mongo.xml');
     $this->setXml($config->getNode());
     if (Mage::app()->useCache(self::CACHE_KEY)) {
         $this->saveCache();
     }
 }
開發者ID:walexer,項目名稱:magento-mongo,代碼行數:22,代碼來源:Schema.php

示例8: __construct

 /**
  * Load config from merged adminhtml.xml files
  */
 public function __construct()
 {
     parent::__construct();
     $this->setCacheId('adminhtml_acl_menu_config');
     /* @var $adminhtmlConfig Varien_Simplexml_Config */
     $adminhtmlConfig = Mage::app()->loadCache($this->getCacheId());
     if ($adminhtmlConfig) {
         $this->_adminhtmlConfig = new Varien_Simplexml_Config($adminhtmlConfig);
     } else {
         $adminhtmlConfig = new Varien_Simplexml_Config();
         $adminhtmlConfig->loadString('<?xml version="1.0"?><config></config>');
         Mage::getConfig()->loadModulesConfiguration('adminhtml.xml', $adminhtmlConfig);
         $this->_adminhtmlConfig = $adminhtmlConfig;
         if (Mage::app()->useCache('config')) {
             Mage::app()->saveCache($adminhtmlConfig->getXmlString(), $this->getCacheId(), array(Mage_Core_Model_Config::CACHE_TAG));
         }
     }
 }
開發者ID:natxetee,項目名稱:magento2,代碼行數:21,代碼來源:Config.php

示例9: __construct

 /**
  * Class constructor
  * load cache configuration
  *
  * @param $data
  */
 public function __construct($data = null)
 {
     parent::__construct($data);
     $this->setCacheId('cache_config');
     $this->_cacheChecksum = null;
     $this->_cache = Mage::app()->getCache();
     $canUsaCache = Mage::app()->useCache('config');
     if ($canUsaCache) {
         if ($this->loadCache()) {
             return $this;
         }
     }
     $config = Mage::getConfig()->loadModulesConfiguration('cache.xml');
     $this->setXml($config->getNode());
     if ($canUsaCache) {
         $this->saveCache(array(Mage_Core_Model_Config::CACHE_TAG));
     }
     return $this;
 }
開發者ID:booklein,項目名稱:bookle,代碼行數:25,代碼來源:Config.php

示例10: __construct

 /**
  * Load config from merged adminhtml.xml files
  * @param array $arguments
  */
 public function __construct(array $arguments = array())
 {
     $this->_app = isset($arguments['app']) ? $arguments['app'] : Mage::app();
     $this->_appConfig = isset($arguments['appConfig']) ? $arguments['appConfig'] : Mage::getConfig();
     if (isset($arguments['helpers'])) {
         $this->_helpers = $arguments['helpers'];
     }
     parent::__construct();
     $this->setCacheId('adminhtml_acl_menu_config');
     /* @var $adminhtmlConfig Varien_Simplexml_Config */
     $adminhtmlConfig = $this->_app->loadCache($this->getCacheId());
     if ($adminhtmlConfig) {
         $this->_adminhtmlConfig = new Varien_Simplexml_Config($adminhtmlConfig);
     } else {
         $adminhtmlConfig = new Varien_Simplexml_Config();
         $adminhtmlConfig->loadString('<?xml version="1.0"?><config></config>');
         $this->_appConfig->loadModulesConfiguration('adminhtml.xml', $adminhtmlConfig);
         $this->_adminhtmlConfig = $adminhtmlConfig;
         if ($this->_app->useCache('config')) {
             $this->_app->saveCache($adminhtmlConfig->getXmlString(), $this->getCacheId(), array(Mage_Core_Model_Config::CACHE_TAG));
         }
     }
 }
開發者ID:nemphys,項目名稱:magento2,代碼行數:27,代碼來源:Config.php

示例11: __construct

 /**
  * Initializes XML for this configuration
  *
  * @param array $arguments
  */
 public function __construct(array $arguments = array())
 {
     $this->_app = isset($arguments['app']) ? $arguments['app'] : Mage::app();
     $sourceData = isset($arguments['data']) ? $arguments['data'] : array();
     return parent::__construct($sourceData);
 }
開發者ID:nemphys,項目名稱:magento2,代碼行數:11,代碼來源:Config.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     $this->loadString('<?xml version="1.0"?><config></config>');
     Mage::getConfig()->loadModulesConfiguration('install.xml', $this);
 }
開發者ID:jpbender,項目名稱:mage_virtual,代碼行數:6,代碼來源:Config.php

示例13: __construct

 /**
  * Constructor
  *
  */
 public function __construct($sourceData = null)
 {
     $this->_elementClass = 'Mage_Core_Model_Config_Element';
     parent::__construct($sourceData);
 }
開發者ID:cewolf2002,項目名稱:magento,代碼行數:9,代碼來源:Base.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     #$this->_elementClass = 'Mage_Core_Model_Config_Element';
     #$this->loadFile(Mage::getModuleDir('etc', 'Mage_Admin').DS.'admin.xml');
 }
開發者ID:HelioFreitas,項目名稱:magento-pt_br,代碼行數:6,代碼來源:Config.php

示例15: __construct

 public function __construct()
 {
     parent::__construct();
     $this->loadFile(AO::getConfig()->getModuleDir('etc', 'Mage_Install') . DS . 'install.xml');
 }
開發者ID:ronseigel,項目名稱:agent-ohm,代碼行數:5,代碼來源:Config.php


注:本文中的Varien_Simplexml_Config::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。