Completed
Push — master ( dbe386...572cd1 )
by Reen
02:36
created

Pager::getLimit()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace ReenExeCubeTime\LightPaginator;
4
5
class Pager implements PagerInterface
6
{
7
    /**
8
     * @var int
9
     */
10
    private $currentPage;
11
12
    /**
13
     * @var int
14
     */
15
    private $limit;
16
17
    /**
18
     * @var int
19
     */
20
    private $count;
21
22
    /**
23
     * @var int
24
     */
25
    private $pageCount;
26
27
    /**
28
     * @var array|\Traversable
29
     */
30
    private $results;
31
32
    public function __construct($currentPage, $limit, $count, $pageCount, $results)
33
    {
34
        $this->currentPage = $currentPage;
35
        $this->limit = $limit;
36
        $this->count = $count;
37
        $this->pageCount = $pageCount;
38
        $this->results = $results;
39
    }
40
41
    /**
42
     * @return int
43
     */
44
    public function getCurrentPage()
45
    {
46
        return $this->currentPage;
47
    }
48
49
    /**
50
     * @return int
51
     */
52
    public function getPerPage()
53
    {
54
        return $this->limit;
55
    }
56
57
    /**
58
     * @return int
59
     */
60
    public function getCount()
61
    {
62
        return $this->count;
63
    }
64
65
    /**
66
     * @return int
67
     */
68
    public function getPageCount()
69
    {
70
        return $this->pageCount;
71
    }
72
73
    /**
74
     * @return array|\Traversable
75
     */
76
    public function getResults()
77
    {
78
        return $this->results;
79
    }
80
}
81