本文整理汇总了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);
}
示例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';
}
示例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);
}
示例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);
}
示例5: __construct
public function __construct($aArgs)
{
$this->_vJobCode = $aArgs[0];
$this->_oJobConfig = $aArgs[1];
ini_set('memory_limit', '3000M');
parent::__construct();
}
示例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?
}
示例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);
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
}
示例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();
}
示例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';
}
示例15: __construct
public function __construct()
{
// Initialize shutdown function
register_shutdown_function(array($this, 'destruct'));
parent::__construct();
}