当前位置: 首页>>代码示例>>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;未经允许,请勿转载。