PHP phalcon\paginator Pager Examples

PHP phalcon\paginator Pager - 2 examples found. These are the top rated real world PHP examples of phalcon\paginator\Pager extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
-1
 /**
  * @link https://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Pager/Layout.php#L406
  * @param  array  $options
  * @return string
  */
 protected function parseUrlTemplate(array $options = [])
 {
     $str = '';
     // If given page is the current active one
     if ($options['page_number'] == $this->pager->getCurrentPage()) {
         $str = $this->parseMaskReplacements($this->selectedTemplate);
     }
     // Possible attempt where Selected == Template
     if ($str == '') {
         $str = $this->parseMaskReplacements($this->template);
     }
     return $str;
 }
Example #2
-1
 /**
  * @expectedException \RuntimeException
  * @expectedExceptionMessage Unable to find layout "UnknownLayoutClass"
  */
 public function testGetLayoutMethodShouldWithInvalidLayoutClassShouldThrowException()
 {
     // stub paginate
     $paginate = new stdClass();
     $paginate->total_pages = 20;
     $paginate->current = 1;
     $mock = Mockery::mock(self::BUILDER_CLASS);
     $mock->shouldReceive('getPaginate')->once()->andReturn($paginate);
     $mock->shouldReceive('getLimit')->once()->andReturn(null);
     $pager = new Pager($mock, ['rangeLength' => 5, 'layoutClass' => 'UnknownLayoutClass', 'urlMask' => 'xxx']);
     $pager->getLayout();
 }