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


PHP Varien_Data_Collection_Db::load方法代码示例

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


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

示例1: testUnshiftOrder

 /**
  * @param PHPUnit_Framework_MockObject_MockObject|Zend_Db_Adapter_Abstract $adapter
  * @depends testSetAddOrder
  */
 public function testUnshiftOrder($adapter)
 {
     $this->_collection->setConnection($adapter);
     $this->_collection->addOrder('some_field', Varien_Data_Collection::SORT_ORDER_ASC);
     $this->_collection->unshiftOrder('other_field', Varien_Data_Collection::SORT_ORDER_ASC);
     $this->_collection->load();
     $selectOrders = $this->_collection->getSelect()->getPart(Zend_Db_Select::ORDER);
     $this->assertEquals('other_field ASC', (string) array_shift($selectOrders));
     $this->assertEquals('some_field ASC', (string) array_shift($selectOrders));
     $this->assertEmpty(array_shift($selectOrders));
 }
开发者ID:relue,项目名称:magento2,代码行数:15,代码来源:DbTest.php

示例2: load

 public function load($printQuery = false, $logQuery = false)
 {
     if ($this->isLoaded()) {
         return $this;
     }
     parent::load($printQuery, $logQuery);
     foreach ($this as $_item) {
         $_item->setAttribute($this->getAttributeBackend()->getAttribute());
     }
     return $this;
 }
开发者ID:arslbbt,项目名称:mangentovies,代码行数:11,代码来源:Collection.php

示例3: load

 /**
  * Load data
  *
  * @return  Varien_Data_Collection_Db
  */
 public function load($printQuery = false, $logQuery = false)
 {
     if (!$this->isLoaded()) {
         Mage::dispatchEvent('core_collection_abstract_load_before', array('collection' => $this));
     }
     parent::load($printQuery, $logQuery);
     foreach ($this->_items as $item) {
         $item->setOrigData();
     }
     return $this;
 }
开发者ID:jauderho,项目名称:magento-mirror,代码行数:16,代码来源:Abstract.php

示例4: load

 /**
  * Load subscribes to collection
  *
  * @param boolean $printQuery
  * @param boolean $logQuery
  * @return Varien_Data_Collection_Db
  */
 public function load($printQuery = false, $logQuery = false)
 {
     if ($this->isLoaded()) {
         return $this;
     }
     parent::load($printQuery, $logQuery);
     return $this;
 }
开发者ID:arslbbt,项目名称:mangentovies,代码行数:15,代码来源:Collection.php

示例5: collectionToCsv

 public function collectionToCsv(Varien_Data_Collection_Db $collection, $arrRequiredFields = array())
 {
     if (!$collection->isLoaded()) {
         $collection->load();
     }
     $data = $collection->toArray($arrRequiredFields);
     if (!$collection instanceof Mage_Eav_Model_Entity_Collection_Abstract) {
         $data = isset($data['items']) ? $data['items'] : array();
     }
     return $this->dataToCsv($data);
 }
开发者ID:protechhelp,项目名称:gamamba,代码行数:11,代码来源:Csv.php

示例6: load

 public function load($printQuery = false, $logQuery = false)
 {
     if ($this->isLoaded()) {
         return $this;
     }
     parent::load($printQuery, $logQuery);
     if ($this->_addStoreDataFlag) {
         $this->_addStoreData();
     }
     return $this;
 }
开发者ID:arslbbt,项目名称:mangentovies,代码行数:11,代码来源:Collection.php

示例7: load

 /**
  * Load data
  *
  * @return  Varien_Data_Collection_Db
  */
 public function load($printQuery = false, $logQuery = false)
 {
     parent::load($printQuery, $logQuery);
     foreach ($this->_items as $item) {
         $item->setOrigData();
     }
     return $this;
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:13,代码来源:Mysql4_Collection_Abstract.php

示例8: load

 public function load($printQuery = false, $logQuery = false)
 {
     if ($this->isLoaded()) {
         return $this;
     }
     Mage::dispatchEvent('review_review_collection_load_before', array('collection' => $this));
     parent::load($printQuery, $logQuery);
     if ($this->_addStoreDataFlag) {
         $this->_addStoreData();
     }
     return $this;
 }
开发者ID:hunnybohara,项目名称:magento-chinese-localization,代码行数:12,代码来源:Collection.php

示例9: load

 public function load($printQuery = false, $logQuery = false)
 {
     if ($this->isLoaded()) {
         return $this;
     }
     Mage::dispatchEvent('log_visitor_collection_load_before', array('collection' => $this));
     return parent::load($printQuery, $logQuery);
 }
开发者ID:jauderho,项目名称:magento-mirror,代码行数:8,代码来源:Collection.php

示例10: load

 /**
  * Load data
  *
  * @return  Varien_Data_Collection_Db
  */
 public function load($printQuery = false, $logQuery = false)
 {
     if (!$this->isLoaded()) {
         Mage::dispatchEvent('core_collection_abstract_load_before', array('collection' => $this));
     }
     parent::load($printQuery, $logQuery);
     return $this;
 }
开发者ID:Rinso,项目名称:magento-mirror,代码行数:13,代码来源:Abstract.php


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