コード例 #1
0
ファイル: Sorter.php プロジェクト: laiello/resmania
 public function sort()
 {
     $data = $this->_units->toArray();
     $data = $this->_calculateAllPrices($data);
     usort($data, array('RM_Unit_Sorter', 'cmp'));
     $config = array('table' => $this->_units->getTable(), 'data' => $data, 'rowClass' => 'RM_Unit_Row', 'stored' => true);
     $this->_sortedUnits = new Zend_Db_Table_Rowset($config);
 }
コード例 #2
0
ファイル: DataMapper.php プロジェクト: sp1ke77/MLM-1
 protected function _loadByPrimaryKeys(\Zend_Db_Table_Rowset $results)
 {
     $collection = array();
     foreach ($results->toArray() as $row) {
         $collection[] = $this->load(array_shift($row));
     }
     return $collection;
 }