| 1 | <?php |
||
| 3 | class CalendarTimePeriod |
||
|
|
|||
| 4 | { |
||
| 5 | |||
| 6 | // Attributes |
||
| 7 | |||
| 8 | private $startTime; |
||
| 9 | private $endTime; |
||
| 10 | |||
| 11 | // Constructor |
||
| 12 | |||
| 13 | public function __construct(CalendarTime $startTime, CalendarTime $endTime) |
||
| 17 | |||
| 18 | // Functions |
||
| 19 | |||
| 20 | public function setAttributes(CalendarTime $startTime, CalendarTime $endTime) |
||
| 29 | |||
| 30 | public function isValidPeriod(CalendarTime $startTime, CalendarTime $endTime) |
||
| 34 | |||
| 35 | public function getStartTime() |
||
| 43 | } |
||
| 44 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.