/** * Retrieve Batch import model * * @return Mage_Dataflow_Model_Import_Export */ public function getBatchImportModel() { if (is_null($this->_batchImport)) { $object = Mage::getModel('dataflow/batch_import'); $this->_batchImport = Varien_Object_Cache::singleton()->save($object); } return Varien_Object_Cache::singleton()->load($this->_batchImport); }
/** * Varien Objects Cache * * @param string $key optional, if specified will load this key * @return Varien_Object_Cache */ public static function objects($key = null) { if (!self::$_objects) { self::$_objects = new Varien_Object_Cache(); } if (is_null($key)) { return self::$_objects; } else { return self::$_objects->load($key); } }
/** * Singleton factory * * @return Varien_Object_Cache */ public static function singleton() { if (!self::$_instance) { self::$_instance = new self(); } return self::$_instance; }
public function getConfigModel() { if (is_null($this->_configModel)) { $object = Mage::getModel('core/config_data'); $this->_configModel = Varien_Object_Cache::singleton()->save($object); } return Varien_Object_Cache::singleton()->load($this->_configModel); }
/** * Retrieve Batch import model * * @return Mage_Dataflow_Model_Import_Export */ public function getBatchImportModel() { if (is_null($this->_batchImport)) { $object = Mage::getModel('Mage_Dataflow_Model_Batch_Import'); $object->setBatchId($this->getId()); $this->_batchImport = Varien_Object_Cache::singleton()->save($object); } return Varien_Object_Cache::singleton()->load($this->_batchImport); }