CustomFormats
6 years ago
Locales
6 years ago
FormatsInterface.php
6 years ago
LICENSE.md
6 years ago
Moment.php
6 years ago
MomentException.php
6 years ago
MomentFromVo.php
6 years ago
MomentHelper.php
6 years ago
MomentLocale.php
6 years ago
MomentPeriodVo.php
6 years ago
MomentPeriodVo.php
103 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WordPressPopularPosts\Moment; |
| 4 | |
| 5 | /** |
| 6 | * MomentPeriodVo |
| 7 | * @package Moment |
| 8 | * @author Tino Ehrich (tino@bigpun.me) |
| 9 | */ |
| 10 | class MomentPeriodVo |
| 11 | { |
| 12 | /** @var Moment */ |
| 13 | protected $startDate; |
| 14 | |
| 15 | /** @var Moment */ |
| 16 | protected $endDate; |
| 17 | |
| 18 | /** @var Moment */ |
| 19 | protected $refDate; |
| 20 | |
| 21 | /** @var int */ |
| 22 | protected $interval; |
| 23 | |
| 24 | /** |
| 25 | * @return int |
| 26 | */ |
| 27 | public function getInterval() |
| 28 | { |
| 29 | return $this->interval; |
| 30 | } |
| 31 | |
| 32 | /** |
| 33 | * @param int $interval |
| 34 | * |
| 35 | * @return MomentPeriodVo |
| 36 | */ |
| 37 | public function setInterval($interval) |
| 38 | { |
| 39 | $this->interval = $interval; |
| 40 | |
| 41 | return $this; |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * @param Moment $reference |
| 46 | * |
| 47 | * @return MomentPeriodVo |
| 48 | */ |
| 49 | public function setRefDate(Moment $reference) |
| 50 | { |
| 51 | $this->refDate = $reference; |
| 52 | |
| 53 | return $this; |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * @return \Moment\Moment |
| 58 | */ |
| 59 | public function getRefDate() |
| 60 | { |
| 61 | return $this->refDate; |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * @param Moment $end |
| 66 | * |
| 67 | * @return MomentPeriodVo |
| 68 | */ |
| 69 | public function setEndDate(Moment $end) |
| 70 | { |
| 71 | $this->endDate = $end; |
| 72 | |
| 73 | return $this; |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * @return Moment |
| 78 | */ |
| 79 | public function getEndDate() |
| 80 | { |
| 81 | return $this->endDate; |
| 82 | } |
| 83 | |
| 84 | /** |
| 85 | * @param Moment $start |
| 86 | * |
| 87 | * @return MomentPeriodVo |
| 88 | */ |
| 89 | public function setStartDate(Moment $start) |
| 90 | { |
| 91 | $this->startDate = $start; |
| 92 | |
| 93 | return $this; |
| 94 | } |
| 95 | |
| 96 | /** |
| 97 | * @return Moment |
| 98 | */ |
| 99 | public function getStartDate() |
| 100 | { |
| 101 | return $this->startDate; |
| 102 | } |
| 103 | } |