コード例 #1
0
ファイル: Array.php プロジェクト: knatorski/SMS
 /**
  * Returns an array of items for a page.
  *
  * @param  integer $offset Page offset
  * @param  integer $itemCountPerPage Number of items per page
  * @return array
  */
 public function getItems($offset, $itemCountPerPage)
 {
     $data = parent::getItems($offset, $itemCountPerPage);
     $return = array();
     $rowsetConfig = array('rowClass' => $this->_rowClass, 'data' => $data);
     $rowset = new Zend_Db_Table_Rowset($rowsetConfig);
     return $rowset;
 }
コード例 #2
0
ファイル: ArrayTest.php プロジェクト: stunti/zf2
 /**
  * @group ZF-4151
  */
 public function testEmptySet()
 {
     $this->_adapter = new Adapter\ArrayAdapter(array());
     $actual = $this->_adapter->getItems(0, 10);
     $this->assertEquals(array(), $actual);
 }
コード例 #3
0
ファイル: NullTest.php プロジェクト: omusico/logica
 /**
  * Verify that the fix for ZF-4151 doesn't create an OBO error
  */
 public function testSetOfOne()
 {
     $this->_adapter = new Zend_Paginator_Adapter_Null(1);
     $actual = $this->_adapter->getItems(0, 10);
     $this->assertEquals(array_fill(0, 1, null), $actual);
 }
コード例 #4
0
ファイル: ArrayTest.php プロジェクト: netvlies/zf
 /**
  * @group ZF-4151
  */
 public function testEmptySet()
 {
     $this->_adapter = new Zend_Paginator_Adapter_Array(array());
     $actual = $this->_adapter->getItems(0, 10);
     $this->assertEquals(array(), $actual);
 }
コード例 #5
0
ファイル: NullTest.php プロジェクト: lortnus/zf1
 public function testReturnsCorrectCount()
 {
     $this->assertEquals(101, $this->_adapter->count());
 }