Phalcon\Paginator\Pager::getLimit PHP Method

getLimit() public method

Get current rows limit (if provided)
public getLimit ( ) : integer | null
return integer | null
    public function getLimit()
    {
        return $this->limit;
    }

Usage Example

コード例 #1
0
ファイル: PagerTest.php プロジェクト: lisong/incubator
 public function testCallingGetPagesInRangeMethodWithDefaultOptionsShouldReturnExpectedArray()
 {
     // stub paginate
     $paginate = new stdClass();
     $paginate->total_pages = 20;
     $paginate->current = 5;
     $paginate->last = 20;
     $mock = Mockery::mock(self::BUILDER_CLASS);
     $mock->shouldReceive('getPaginate')->once()->andReturn($paginate);
     $mock->shouldReceive('getLimit')->once()->andReturn(null);
     $pager = new Pager($mock);
     $this->assertEquals([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], $pager->getPagesInRange());
     $this->assertEquals(null, $pager->getLimit());
 }