Pop\Paginator\Paginator::__construct PHP Method

__construct() public method

Instantiate the paginator object.
public __construct ( array $items, integer $perPage = 10, integer $range = 10, integer $total = null ) : Paginator
$items array
$perPage integer
$range integer
$total integer
return Paginator
    public function __construct(array $items, $perPage = 10, $range = 10, $total = null)
    {
        $this->items = $items;
        $this->perPage = (int) $perPage;
        $this->range = $range > 0 ? (int) $range : 10;
        $this->total = null !== $total ? (int) $total : null;
    }