Ejemplo n.º 1
0
 /**
  * Constructor with parameters
  * Array of arguments with keys
  *  - 'factory' Mage_Core_Model_Factory
  *  - 'config' Mage_Core_Model_Config
  *  - 'app' Mage_Core_Model_App
  *
  * @param array $args
  */
 public function __construct(array $args = array())
 {
     $this->_factory = !empty($args['factory']) ? $args['factory'] : Mage::getSingleton('core/factory');
     $this->_config = !empty($args['config']) ? $args['config'] : Mage::getConfig();
     $this->_app = !empty($args['app']) ? $args['app'] : Mage::app();
     parent::__construct();
 }
Ejemplo n.º 2
0
 /**
  * Constructor
  *
  * @param array $args
  */
 public function __construct(array $args = array())
 {
     $this->_mail = isset($args['mail']) ? $args['mail'] : Mage::getModel('core/email_template');
     parent::__construct($args);
 }