| 1 | <?php |
||
| 11 | class Node |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var int |
||
| 15 | */ |
||
| 16 | protected $page = 1; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $link = ''; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var bool |
||
| 25 | */ |
||
| 26 | protected $is_current = false; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param int $page |
||
| 30 | * @param string $link |
||
| 31 | * @param bool $is_current |
||
| 32 | */ |
||
| 33 | 22 | public function __construct($page = 1, $link = '', $is_current = false) |
|
| 34 | { |
||
| 35 | 22 | $this->page = $page; |
|
| 36 | 22 | $this->link = $link; |
|
| 37 | 22 | $this->is_current = $is_current; |
|
| 38 | 22 | } |
|
| 39 | |||
| 40 | /** |
||
| 41 | * @return bool |
||
| 42 | */ |
||
| 43 | 2 | public function isCurrent() |
|
| 44 | { |
||
| 45 | 2 | return $this->is_current; |
|
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return string |
||
| 50 | */ |
||
| 51 | 16 | public function getLink() |
|
| 55 | |||
| 56 | /** |
||
| 57 | * @return int |
||
| 58 | */ |
||
| 59 | 16 | public function getPage() |
|
| 63 | } |
||
| 64 |