11 * @param integer $itemCount Number of items in total
12 * @param integer $perPage Number of items on one page
13 * @param integer $currentPage Current page, beginning with 1
14 * @param string $filename URL the page number shall be appended
16 public function __construct($itemCount, $perPage, $currentPage, $filename)
19 if (strpos($filename, '%d') !== false) {
22 //fix non-static factory method error
23 error_reporting(error_reporting() & ~E_STRICT);
24 $this->pager = \Pager::factory(
27 'perPage' => $perPage,
29 'totalItems' => $itemCount,
30 'currentPage' => $currentPage,
34 'fileName' => $filename,
36 'spacesBeforeSeparator' => 0,
37 'spacesAfterSeparator' => 0,
38 'curPageSpanPre' => '',
39 'curPageSpanPost' => '',
41 'firstPageText' => 'first',
42 'firstPagePost' => '',
44 'lastPageText' => 'last',
46 'prevImg' => '« prev',
47 'nextImg' => 'next »',
53 public function getLinks()
55 $arLinks = $this->pager->getLinks();
56 $arLinks['pages'] = explode('###', $arLinks['pages']);
60 public function numPages()
62 return $this->pager->numPages();