当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage::objects方法代码示例

本文整理汇总了PHP中Mage::objects方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage::objects方法的具体用法?PHP Mage::objects怎么用?PHP Mage::objects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage的用法示例。


在下文中一共展示了Mage::objects方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getBlockModel

 public function getBlockModel()
 {
     if (is_null($this->_cmsBlockObj)) {
         $blockModel = Mage::getModel('cms/block');
         $this->_cmsBlockObj = Mage::objects()->save($blockModel);
     }
     return Mage::objects()->load($this->_cmsBlockObj);
 }
开发者ID:jronatay,项目名称:ultimo-magento-jron,代码行数:8,代码来源:Cmsblocks.php

示例2: getPageModel

 public function getPageModel()
 {
     if (is_null($this->_cmsPageObj)) {
         $pageModel = Mage::getModel('cms/page');
         $this->_cmsPageObj = Mage::objects()->save($pageModel);
     }
     return Mage::objects()->load($this->_cmsPageObj);
 }
开发者ID:jronatay,项目名称:ultimo-magento-jron,代码行数:8,代码来源:Cms.php

示例3: discard

 /**
  * Removes objects created in object cache
  * Clears loaded data property
  *
  * @see EcomDev_PHPUnit_Model_Test_LoadableInterface::discard()
  */
 public function discard()
 {
     foreach ($this->_dataObjectIds as $objectId) {
         Mage::objects()->delete($objectId);
     }
     $this->_dataObjectIds = array();
     $this->_loadedData = null;
     return $this;
 }
开发者ID:tiagosampaio,项目名称:EcomDev_PHPUnit,代码行数:15,代码来源:Expectation.php

示例4: getNewsletterModel

 /**
  * Retrieve newsletter subscribers model cache
  *
  * @return Mage_Newsletter_Model_Subscriber
  */
 public function getNewsletterModel()
 {
     if (is_null($this->_newsletterModel)) {
         $object = Mage::getModel('newsletter/subscriber');
         $this->_newsletterModel = Mage::objects()->save($object);
     }
     return Mage::objects()->load($this->_newsletterModel);
 }
开发者ID:ankita-parashar,项目名称:magento,代码行数:13,代码来源:Intersec_Orderimportexport_Model_Convert_Parser_guest+orders_Exportorders.php

示例5: getProductModel

 /**
  * Retrieve product model cache
  *
  * @return Mage_Catalog_Model_Product
  */
 public function getProductModel()
 {
     if (is_null($this->_productModel)) {
         $productModel = Mage::getModel('catalog/product');
         $this->_productModel = Mage::objects()->save($productModel);
     }
     return Mage::objects()->load($this->_productModel);
 }
开发者ID:quyip8818,项目名称:Mag,代码行数:13,代码来源:Product.php

示例6: getStockItem

 public function getStockItem()
 {
     return Mage::objects()->load(Mage::registry('Object_Cache_StockItem'));
 }
开发者ID:cnglobal-sl,项目名称:caterez,代码行数:4,代码来源:Product.php

示例7: __destruct

 /**
  * Object destructor removes
  * created objects from object pool
  *
  *
  */
 public function __destruct()
 {
     if (!empty($this->_createdObjectIds)) {
         foreach ($this->_createdObjectIds as $objectId) {
             Mage::objects()->delete($objectId);
         }
     }
 }
开发者ID:NatashaOlut,项目名称:Mage_Test,代码行数:14,代码来源:Object.php

示例8: getCustomer

 public function getCustomer()
 {
     return Mage::objects()->load(Mage::registry('Object_Cache_Customer'));
 }
开发者ID:ravi2jdesign,项目名称:solvingmagento_1.7.0,代码行数:4,代码来源:Customer.php

示例9: getProductModel

 /**
  * Retrieve product model cache
  *
  * @return Mage_Catalog_Model_Product
  */
 public function getProductModel()
 {
     /* if($type == 'simple'){
        if (is_null($this->_productModel)) {
        $productModel = Mage::getModel('catalog/productimport');
        $this->_productModel = Mage::objects()->save($productModel);
        }
        return Mage::objects()->load($this->_productModel);
        } else {
        if (is_null($this->_productConfModel)) {
        $productModel = Mage::getModel('catalog/productimport');
        $this->_productConfModel = Mage::objects()->save($productModel);
        }
        return Mage::objects()->load($this->_productConfModel);
        } */
     if (is_null($this->_productModel)) {
         $productModel = Mage::getModel('catalog/import_product');
         $this->_productModel = Mage::objects()->save($productModel);
     }
     return Mage::objects()->load($this->_productModel);
 }
开发者ID:hyhoocchan,项目名称:extension,代码行数:26,代码来源:Productimport.php


注:本文中的Mage::objects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。