3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Paginator\Adapter
;
12 class Null implements AdapterInterface
19 protected $count = null;
24 * @param int $count Total item count (Optional)
26 public function __construct($count = 0)
28 $this->count
= $count;
32 * Returns an array of items for a page.
34 * @param int $offset Page offset
35 * @param int $itemCountPerPage Number of items per page
38 public function getItems($offset, $itemCountPerPage)
40 if ($offset >= $this->count()) {
44 $remainItemCount = $this->count() - $offset;
45 $currentItemCount = $remainItemCount > $itemCountPerPage ?
$itemCountPerPage : $remainItemCount;
47 return array_fill(0, $currentItemCount, null);
51 * Returns the total number of rows in the array.
55 public function count()