| @@ 804-815 (lines=12) @@ | ||
| 801 | return $this; |
|
| 802 | } |
|
| 803 | ||
| 804 | public function isClosed() |
|
| 805 | { |
|
| 806 | $today = new DateTime('now'); |
|
| 807 | if (($this->getCloseDate() && $this->getCloseDate()->setTime(23, 59, 59) < $today) |
|
| 808 | || |
|
| 809 | ($this->getPublicationDate() && $this->getPublicationDate()->setTime(0, 0, 0) > $today) |
|
| 810 | ) { |
|
| 811 | return true; |
|
| 812 | } |
|
| 813 | ||
| 814 | return false; |
|
| 815 | } |
|
| 816 | ||
| 817 | public function isOpen() |
|
| 818 | { |
|
| @@ 822-833 (lines=12) @@ | ||
| 819 | return !$this->isClosed(); |
|
| 820 | } |
|
| 821 | ||
| 822 | public function isStarted() |
|
| 823 | { |
|
| 824 | $today = new DateTime('now'); |
|
| 825 | if (((!$this->getStartDate() || $this->getStartDate()->setTime(0, 0, 0) <= $today)) |
|
| 826 | && |
|
| 827 | (!$this->getEndDate() || $this->getEndDate()->setTime(23, 59, 59) > $today) |
|
| 828 | ) { |
|
| 829 | return true; |
|
| 830 | } |
|
| 831 | ||
| 832 | return false; |
|
| 833 | } |
|
| 834 | ||
| 835 | public function isFinished() |
|
| 836 | { |
|
| @@ 835-846 (lines=12) @@ | ||
| 832 | return false; |
|
| 833 | } |
|
| 834 | ||
| 835 | public function isFinished() |
|
| 836 | { |
|
| 837 | $today = new DateTime('now'); |
|
| 838 | if ($this->getEndDate() && $this->getEndDate()->setTime(23, 59, 59) <= $today |
|
| 839 | || |
|
| 840 | ($this->getCloseDate() && $this->getCloseDate()->setTime(23, 59, 59) <= $today) |
|
| 841 | ) { |
|
| 842 | return true; |
|
| 843 | } |
|
| 844 | ||
| 845 | return false; |
|
| 846 | } |
|
| 847 | ||
| 848 | public function isOnline() |
|
| 849 | { |
|