本文整理汇总了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');
}
示例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'];
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例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();
}
示例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);
}
示例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);
}
示例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;
}
示例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();
}
示例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();
}