예제 #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 testGetsItems()
 {
     $actual = $this->_adapter->getItems(0, 10);
     $this->assertEquals(array_fill(0, 10, null), $actual);
 }
예제 #6
0
 public function testGetItemsOffsetTen()
 {
     $expected = range(11, 20);
     $actual = $this->_adapter->getItems(10, 10);
     $this->assertEquals($expected, $actual);
 }