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


PHP Varien_Object::__construct方法代碼示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $this->_steps = array(self::STEP_SELECT_ADDRESSES => new Varien_Object(array('label' => Mage::helper('checkout')->__('Select Addresses'))), self::STEP_SHIPPING => new Varien_Object(array('label' => Mage::helper('checkout')->__('Shipping Information'))), self::STEP_BILLING => new Varien_Object(array('label' => Mage::helper('checkout')->__('Billing Information'))), self::STEP_OVERVIEW => new Varien_Object(array('label' => Mage::helper('checkout')->__('Place Order'))), self::STEP_SUCCESS => new Varien_Object(array('label' => Mage::helper('checkout')->__('Order Success'))));
     $this->_checkout = Mage::getSingleton('checkout/type_multishipping');
     $this->_steps[$this->getActiveStep()]->setIsActive(true);
 }
開發者ID:arslbbt,項目名稱:mangentovies,代碼行數:7,代碼來源:State.php

示例2: __construct

 /**
  * Initialize default values of the options
  *
  * @param array $data
  */
 public function __construct(array $data = array())
 {
     $this->_io = isset($data['io']) ? $data['io'] : new Varien_Io_File();
     unset($data['io']);
     parent::__construct($data);
     $appRoot = isset($data['app_dir']) ? $data['app_dir'] : Mage::getRoot();
     $root = dirname($appRoot);
     $this->_data['app_dir'] = $appRoot;
     $this->_data['base_dir'] = $root;
     $this->_data['code_dir'] = $appRoot . DIRECTORY_SEPARATOR . 'code';
     $this->_data['design_dir'] = $appRoot . DIRECTORY_SEPARATOR . 'design';
     $this->_data['etc_dir'] = $appRoot . DIRECTORY_SEPARATOR . 'etc';
     $this->_data['lib_dir'] = $root . DIRECTORY_SEPARATOR . 'lib';
     $this->_data['locale_dir'] = $appRoot . DIRECTORY_SEPARATOR . 'locale';
     $this->_data['pub_dir'] = $root . DIRECTORY_SEPARATOR . 'pub';
     $this->_data['js_dir'] = $this->_data['pub_dir'] . DIRECTORY_SEPARATOR . 'lib';
     $this->_data['media_dir'] = isset($data['media_dir']) ? $data['media_dir'] : $this->_data['pub_dir'] . DIRECTORY_SEPARATOR . 'media';
     $this->_data['var_dir'] = $this->getVarDir();
     $this->_data['tmp_dir'] = $this->_data['var_dir'] . DIRECTORY_SEPARATOR . 'tmp';
     $this->_data['cache_dir'] = $this->_data['var_dir'] . DIRECTORY_SEPARATOR . 'cache';
     $this->_data['log_dir'] = $this->_data['var_dir'] . DIRECTORY_SEPARATOR . 'log';
     $this->_data['session_dir'] = $this->_data['var_dir'] . DIRECTORY_SEPARATOR . 'session';
     $this->_data['upload_dir'] = $this->_data['media_dir'] . DIRECTORY_SEPARATOR . 'upload';
     $this->_data['export_dir'] = $this->_data['var_dir'] . DIRECTORY_SEPARATOR . 'export';
 }
開發者ID:natxetee,項目名稱:magento2,代碼行數:30,代碼來源:Options.php

示例3: __construct

 /**
  * Constructor
  *
  * @param Magento_Filesystem $filesystem
  * @param array $data
  */
 public function __construct(Magento_Filesystem $filesystem, array $data = array())
 {
     $this->_filesystem = $filesystem;
     $this->_filesystem->setIsAllowCreateDirectories(true);
     $this->_filesystem->setWorkingDirectory($this->getHelper()->getStorageRoot());
     parent::__construct($data);
 }
開發者ID:natxetee,項目名稱:magento2,代碼行數:13,代碼來源:Storage.php

示例4: __construct

 /**
  * Constructor
  *
  * @param array $args
  */
 public function __construct(array $args = array())
 {
     $this->_factory = !empty($args['factory']) ? $args['factory'] : Mage::getSingleton('core/factory');
     $this->_app = !empty($args['app']) ? $args['app'] : Mage::app();
     unset($args['factory'], $args['app']);
     parent::__construct($args);
 }
開發者ID:okite11,項目名稱:frames21,代碼行數:12,代碼來源:Emulation.php

示例5: __construct

 public function __construct($aArgs)
 {
     $this->_vJobCode = $aArgs[0];
     $this->_oJobConfig = $aArgs[1];
     ini_set('memory_limit', '3000M');
     parent::__construct();
 }
開發者ID:aligent,項目名稱:Aligent_Batchjob,代碼行數:7,代碼來源:Abstract.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $this->setCaption("Unnamed customer behavior points rule action");
     // TODO transalte me?
     $this->setDescription("Unnamed customer behavior points rule action");
     // TODO translate me?
 }
開發者ID:rajarshc,項目名稱:Rooja,代碼行數:8,代碼來源:Abstract.php

示例7: __construct

 /**
  * @param Mage_Backup_Helper_Data $helper
  * @param array $data
  */
 public function __construct(Mage_Backup_Helper_Data $helper, $data = array())
 {
     $adapter = new Magento_Filesystem_Adapter_Zlib(self::COMPRESS_RATE);
     $this->_filesystem = new Magento_Filesystem($adapter);
     $this->_filesystem->setIsAllowCreateDirectories(true);
     $this->_helper = $helper;
     parent::__construct($data);
 }
開發者ID:natxetee,項目名稱:magento2,代碼行數:12,代碼來源:Backup.php

示例8: __construct

 public function __construct()
 {
     $mapping = Mage::helper('merlinsearch/mapping');
     $this->_facetableHistAttributes = array("price" => array(0, 1000, 25));
     $this->_facetableEnumAttributes = $mapping->getEnumFacets();
     $this->addFacetableAttribute('category');
     parent::__construct();
 }
開發者ID:blackbirdtech,項目名稱:merlin-magento,代碼行數:8,代碼來源:Facet.php

示例9: __construct

 public function __construct(array $data = array())
 {
     $this->_eventManager = isset($data['eventManager']) ? $data['eventManager'] : Mage::getSingleton('Mage_Core_Model_Event_Manager');
     $this->_structureReader = isset($data['structureReader']) ? $data['structureReader'] : Mage::getSingleton('Mage_Backend_Model_Config_Structure_Reader');
     $this->_transactionFactory = isset($data['transactionFactory']) ? $data['transactionFactory'] : Mage::getSingleton('Mage_Core_Model_Resource_Transaction_Factory');
     $this->_objectFactory = isset($data['objectFactory']) ? $data['objectFactory'] : Mage::getConfig();
     $this->_appConfig = isset($data['applicationConfig']) ? $data['applicationConfig'] : Mage::getConfig();
     $this->_application = isset($data['application']) ? $data['application'] : Mage::app();
     parent::__construct($data);
 }
開發者ID:nickimproove,項目名稱:magento2,代碼行數:10,代碼來源:Config.php

示例10: __construct

 /**
  * Init model, steps
  *
  */
 public function __construct()
 {
     parent::__construct();
     $this->_steps = array(self::STEP_SELECT_ADDRESSES => new Varien_Object(array('label' => Mage::helper('Mage_Checkout_Helper_Data')->__('Select Addresses'))), self::STEP_SHIPPING => new Varien_Object(array('label' => Mage::helper('Mage_Checkout_Helper_Data')->__('Shipping Information'))), self::STEP_BILLING => new Varien_Object(array('label' => Mage::helper('Mage_Checkout_Helper_Data')->__('Billing Information'))), self::STEP_OVERVIEW => new Varien_Object(array('label' => Mage::helper('Mage_Checkout_Helper_Data')->__('Place Order'))), self::STEP_SUCCESS => new Varien_Object(array('label' => Mage::helper('Mage_Checkout_Helper_Data')->__('Order Success'))));
     foreach ($this->_steps as $step) {
         $step->setIsComplete(false);
     }
     $this->_checkout = Mage::getSingleton('Mage_Checkout_Model_Type_Multishipping');
     $this->_steps[$this->getActiveStep()]->setIsActive(true);
 }
開發者ID:nemphys,項目名稱:magento2,代碼行數:14,代碼來源:State.php

示例11: __construct

 /**
  * Init model, steps
  *
  */
 public function __construct()
 {
     parent::__construct();
     $this->_steps = array(self::STEP_SHIPPING => new Varien_Object(array('label' => Mage::helper('checkout')->__('Shipping Information'))), self::STEP_BILLING => new Varien_Object(array('label' => Mage::helper('checkout')->__('Billing Information'))), self::STEP_OVERVIEW => new Varien_Object(array('label' => Mage::helper('checkout')->__('Place Order'))), self::STEP_SUCCESS => new Varien_Object(array('label' => Mage::helper('checkout')->__('Order Success'))));
     foreach ($this->_steps as $step) {
         $step->setIsComplete(false);
     }
     $this->_checkout = Mage::getSingleton('ketai/type_checkout');
     $this->_steps[$this->getActiveStep()]->setIsActive(true);
 }
開發者ID:eguchi,項目名稱:Magento-Rack-Ketai,代碼行數:14,代碼來源:State.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     $this->loadAttributeOptions()->loadOperatorOptions()->loadValueOptions();
     foreach ($this->getAttributeOption() as $attr => $dummy) {
         $this->setAttribute($attr);
         break;
     }
     foreach ($this->getOperatorOption() as $operator => $dummy) {
         $this->setOperator($operator);
         break;
     }
 }
開發者ID:hunnybohara,項目名稱:magento-chinese-localization,代碼行數:13,代碼來源:Abstract.php

示例13: __construct

 /**
  * Initialise the queue with the queue name 
  * 
  * @param mixed $queue The queue identifier
  * 
  * @return void
  */
 public function __construct($queue = null)
 {
     //set the queue appropriately
     if (is_null($queue) || !array_key_exists('queue', $queue)) {
         $_queue = self::DEFAULT_QUEUE_CODE;
     } else {
         $_queue = $queue['queue'];
     }
     //assign the queue name
     $this->_queue = $_queue;
     //and run the inheritor
     parent::__construct();
 }
開發者ID:svenvarkel,項目名稱:magento-lilmuckers_queue,代碼行數:20,代碼來源:Abstract.php

示例14: __construct

 /**
  * Initialize default values of the options
  */
 public function __construct()
 {
     parent::__construct();
     $appRoot = Mage::getRoot();
     $root = dirname($appRoot);
     $this->_data['app_dir'] = $appRoot;
     $this->_data['base_dir'] = $root;
     $this->_data['code_dir'] = $appRoot . DIRECTORY_SEPARATOR . 'code';
     $this->_data['design_dir'] = $appRoot . DIRECTORY_SEPARATOR . 'design';
     $this->_data['etc_dir'] = $appRoot . DIRECTORY_SEPARATOR . 'etc';
     $this->_data['lib_dir'] = $root . DIRECTORY_SEPARATOR . 'lib';
     $this->_data['locale_dir'] = $appRoot . DIRECTORY_SEPARATOR . 'locale';
     $this->_data['pub_dir'] = $root . DIRECTORY_SEPARATOR . 'pub';
     $this->_data['js_dir'] = $this->_data['pub_dir'] . DIRECTORY_SEPARATOR . 'js';
     $this->_data['media_dir'] = $this->_data['pub_dir'] . DIRECTORY_SEPARATOR . 'media';
     $this->_data['var_dir'] = $this->getVarDir();
     $this->_data['tmp_dir'] = $this->_data['var_dir'] . DIRECTORY_SEPARATOR . 'tmp';
     $this->_data['cache_dir'] = $this->_data['var_dir'] . DIRECTORY_SEPARATOR . 'cache';
     $this->_data['log_dir'] = $this->_data['var_dir'] . DIRECTORY_SEPARATOR . 'log';
     $this->_data['session_dir'] = $this->_data['var_dir'] . DIRECTORY_SEPARATOR . 'session';
     $this->_data['upload_dir'] = $this->_data['media_dir'] . DIRECTORY_SEPARATOR . 'upload';
     $this->_data['export_dir'] = $this->_data['var_dir'] . DIRECTORY_SEPARATOR . 'export';
 }
開發者ID:relue,項目名稱:magento2,代碼行數:26,代碼來源:Options.php

示例15: __construct

 public function __construct()
 {
     // Initialize shutdown function
     register_shutdown_function(array($this, 'destruct'));
     parent::__construct();
 }
開發者ID:hientruong90,項目名稱:ee_14_installer,代碼行數:6,代碼來源:Import.php


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