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


PHP Mage_Core_Model_Abstract::__construct方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $this->_smxUsername = Mage::getStoreConfig('smsconnexion_account_setup/account_group/smsconnexion_username');
     $this->_smxPassword = Mage::getStoreConfig('smsconnexion_account_setup/account_group/smsconnexion_password');
     $this->_smxSecret = Mage::getStoreConfig('smsconnexion_account_setup/account_group/smsconnexion_secret');
 }
开发者ID:mSupply,项目名称:runnable_test_repo,代码行数:7,代码来源:Smsbalance.php

示例2: __construct

 /**
  * Constructor.
  *
  * Sets up this Value Object.
  *
  * @param array $args the object data.
  */
 public function __construct(array $args)
 {
     parent::__construct();
     if (!isset($args['productId']) || empty($args['productId'])) {
         Mage::log(sprintf('%s.productId must have a value', __CLASS__), Zend_Log::WARN, Nosto_Tagging_Model_Base::LOG_FILE_NAME);
         $args['productId'] = '';
     }
     if (!isset($args['quantity']) || empty($args['quantity'])) {
         Mage::log(sprintf('%s.quantity must have a value', __CLASS__), Zend_Log::WARN, Nosto_Tagging_Model_Base::LOG_FILE_NAME);
         $args['quantity'] = '';
     }
     if (!isset($args['name']) || empty($args['name'])) {
         Mage::log(sprintf('%s.name must be a non-empty string value', __CLASS__), Zend_Log::WARN, Nosto_Tagging_Model_Base::LOG_FILE_NAME);
         $args['name'] = '';
     }
     if (!isset($args['unitPrice']) || empty($args['unitPrice'])) {
         Mage::log(sprintf('%s.unitPrice must have a value', __CLASS__), Zend_Log::WARN, Nosto_Tagging_Model_Base::LOG_FILE_NAME);
         $args['unitPrice'] = '';
     }
     if (!isset($args['currencyCode']) || empty($args['currencyCode'])) {
         Mage::log(sprintf('%s.currencyCode must be a numeric value', __CLASS__), Zend_Log::WARN, Nosto_Tagging_Model_Base::LOG_FILE_NAME);
         $args['currencyCode'] = '';
     }
     $this->_productId = $args['productId'];
     $this->_quantity = $args['quantity'];
     $this->_name = $args['name'];
     $this->_unitPrice = $args['unitPrice'];
     $this->_currencyCode = $args['currencyCode'];
 }
开发者ID:nosto,项目名称:nosto-magento-extension,代码行数:36,代码来源:Item.php

示例3: __construct

 /**
  * Constructor
  *
  * @param array $args
  */
 public function __construct(array $args = array())
 {
     $this->_factory = !empty($args['factory']) ? $args['factory'] : Mage::getSingleton('core/factory');
     $this->_eventPrefix = 'enterprise_url_rewrite';
     $this->_eventObject = 'url_rewrite';
     parent::__construct($args);
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:12,代码来源:Rewrite.php

示例4: __construct

 /**
  * Varien model constructor
  */
 public function __construct(Mage_Core_Model_Event_Manager $eventDispatcher, Mage_Core_Model_Cache $cacheManager, Mage_Tax_Helper_Data $taxHelper, Mage_Tax_Model_Class $taxClass, Mage_Core_Model_Resource_Abstract $resource = null, Varien_Data_Collection_Db $resourceCollection = null, array $data = array())
 {
     parent::__construct($eventDispatcher, $cacheManager, $resource, $resourceCollection, $data);
     $this->_init('Mage_Tax_Model_Resource_Calculation_Rule');
     $this->_helper = $taxHelper;
     $this->_taxClass = $taxClass;
 }
开发者ID:natxetee,项目名称:magento2,代码行数:10,代码来源:Rule.php

示例5: __construct

 public function __construct($params)
 {
     parent::__construct();
     !isset($params['childFolder']) && ($params['childFolder'] = NULL);
     $params['childFolder'] === '' && ($params['childFolder'] = NULL);
     if (Mage::helper('M2ePro/Magento')->isMagentoGoMode()) {
         $this->_pathVariablesDirBase = Mage::getBaseDir('media') . DS . self::BASE_NAME;
     } else {
         $this->_pathVariablesDirBase = Mage::getBaseDir('var') . DS . self::BASE_NAME;
     }
     if (!is_null($params['childFolder'])) {
         if ($params['childFolder'][0] != DS) {
             $params['childFolder'] = DS . $params['childFolder'];
         }
         if ($params['childFolder'][strlen($params['childFolder']) - 1] != DS) {
             $params['childFolder'] .= DS;
         }
         $this->_pathVariablesDirChildFolder = $this->_pathVariablesDirBase . $params['childFolder'];
         $this->_pathVariablesDirBase .= DS;
         $this->_childFolder = $params['childFolder'];
     } else {
         $this->_pathVariablesDirBase .= DS;
         $this->_pathVariablesDirChildFolder = $this->_pathVariablesDirBase;
         $this->_childFolder = '';
     }
     $this->_pathVariablesDirBase = str_replace(array('/', '\\'), DS, $this->_pathVariablesDirBase);
     $this->_pathVariablesDirChildFolder = str_replace(array('/', '\\'), DS, $this->_pathVariablesDirChildFolder);
     $this->_childFolder = str_replace(array('/', '\\'), DS, $this->_childFolder);
 }
开发者ID:par-orillonsoft,项目名称:app,代码行数:29,代码来源:VariablesDir.php

示例6: __construct

 public function __construct(array $data = array())
 {
     $this->_httpHelper = !empty($data['http_helper']) ? $data['http_helper'] : Mage::helper('core/http');
     $this->_config = !empty($data['config']) ? $data['config'] : Mage::getConfig();
     $this->_logCondition = !empty($data['log_condition']) ? $data['log_condition'] : Mage::helper('log');
     $this->_session = !empty($data['session']) ? $data['session'] : Mage::getSingleton('core/session');
     parent::__construct($data);
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:8,代码来源:Visitor.php

示例7: __construct

 /**
  * Initialize data
  *
  * @param array $data
  */
 public function __construct(Mage_Core_Model_Event_Manager $eventDispatcher, Mage_Core_Model_Cache $cacheManager, Mage_Core_Model_Resource_Abstract $resource = null, Varien_Data_Collection_Db $resourceCollection = null, array $data = array())
 {
     if (isset($data['helper'])) {
         $this->_helperInstance = $data['helper'];
         unset($data['helper']);
     }
     parent::__construct($eventDispatcher, $cacheManager, $resource, $resourceCollection, $data);
 }
开发者ID:natxetee,项目名称:magento2,代码行数:13,代码来源:Set.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     $this->settings = new Varien_Simplexml_Config();
     $this->settings->loadFile(Mage::getBaseDir() . $this->_file);
     if (!$this->settings) {
         throw new Exception('Can not read theme config file ' . Mage::getBaseDir() . $this->_file);
     }
 }
开发者ID:victorkho,项目名称:telor,代码行数:9,代码来源:Activation.php

示例9: __construct

 /**
  * load theme xml
  */
 public function __construct()
 {
     parent::__construct();
     $filePath = Mage::getBaseDir() . '/app/code/local/Magik/Civicsettings/etc/civic.xml';
     $this->settings = new Varien_Simplexml_Config($filePath);
     if (!$this->settings || !is_readable($filePath)) {
         throw new Exception('Can not read theme config file ' . $filePath);
     }
 }
开发者ID:umair73,项目名称:Karim-Block,代码行数:12,代码来源:Settings.php

示例10: __construct

 /**
  * Constructor
  *
  * @param $arguments array
  */
 public function __construct($arguments)
 {
     if (!empty($arguments['factory'])) {
         $this->_factory = $arguments['factory'];
     } else {
         $this->_factory = Mage::getModel('mview/factory');
     }
     parent::__construct();
 }
开发者ID:aaronleslie,项目名称:aaronunix,代码行数:14,代码来源:Abstract.php

示例11: __construct

 /**
  * @param Mage_Core_Model_Event_Manager $eventDispatcher
  * @param Mage_Core_Model_Cache $cacheManager
  * @param Magento_Filesystem $filesystem
  * @param Mage_Core_Model_Resource_Abstract $resource
  * @param Varien_Data_Collection_Db $resourceCollection
  * @param array $data
  */
 public function __construct(Mage_Core_Model_Event_Manager $eventDispatcher, Mage_Core_Model_Cache $cacheManager, Magento_Filesystem $filesystem, Mage_Core_Model_Resource_Abstract $resource = null, Varien_Data_Collection_Db $resourceCollection = null, array $data = array())
 {
     parent::__construct($eventDispatcher, $cacheManager, $resource, $resourceCollection, $data);
     $baseDir = Mage::getSingleton('Mage_Catalog_Model_Product_Media_Config')->getBaseMediaPath();
     $this->_filesystem = $filesystem;
     $this->_filesystem->setIsAllowCreateDirectories(true);
     $this->_filesystem->ensureDirectoryExists($baseDir);
     $this->_filesystem->setIsAllowCreateDirectories(false);
     $this->_filesystem->setWorkingDirectory($baseDir);
 }
开发者ID:natxetee,项目名称:magento2,代码行数:18,代码来源:Image.php

示例12: __construct

 public function __construct($data = null)
 {
     if (is_array($data)) {
         if (isset($data['scope'])) {
             $this->_scope = $data['scope'];
             unset($data['scope']);
         }
     }
     parent::__construct($data);
 }
开发者ID:xiaoguizhidao,项目名称:cupboardglasspipes.ecomitize.com,代码行数:10,代码来源:Entity.php

示例13: __construct

 public function __construct($params)
 {
     parent::__construct();
     if (!isset($params['nameFile']) || $params['nameFile'] === '') {
         throw new Exception('The name of log file is not specified.');
     }
     !isset($params['folder']) && ($params['folder'] = NULL);
     $params['folder'] === '' && ($params['folder'] = NULL);
     $this->_variablesDirModel = Mage::getModel('M2ePro/VariablesDir', array('childFolder' => $params['folder']));
     $this->_pathLogFile = $this->_variablesDirModel->getPath() . $params['nameFile'] . '.' . self::FILE_EXTENSION;
 }
开发者ID:par-orillonsoft,项目名称:app,代码行数:11,代码来源:LogFile.php

示例14: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     $addressAttributes = Mage::getModel('customer/address')->getAttributes();
     foreach ($addressAttributes as $attr) {
         if (!$attr->getFrontendLabel()) {
             continue;
         }
         $this->_possibleChanges[$attr->getAttributeCode()] = $attr->getFrontendLabel();
     }
     return parent::__construct();
 }
开发者ID:AleksNesh,项目名称:pandora,代码行数:14,代码来源:Log.php

示例15: __construct

 public function __construct()
 {
     $args = func_get_args();
     empty($args[0]) && ($args[0] = array());
     $params = $args[0];
     if (empty($params['orm'])) {
         throw new Exception('ORM for config is not defined.');
     }
     $this->_ormConfig = $params['orm'];
     parent::__construct();
 }
开发者ID:naz-ahmed,项目名称:ndap-magento-mirror,代码行数:11,代码来源:ConfigBase.php


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