| 1 | <?php |
||
| 11 | class Occurrence |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Insert ocurrence |
||
| 15 | * |
||
| 16 | * @const string |
||
| 17 | */ |
||
| 18 | const INSERT = 'I'; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Cancel occurrence |
||
| 22 | * |
||
| 23 | * @const string |
||
| 24 | */ |
||
| 25 | const CANCEL = 'C'; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Update occurrence |
||
| 29 | * |
||
| 30 | * @const string |
||
| 31 | */ |
||
| 32 | const UPDATE = 'A'; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Occurrence type |
||
| 36 | * |
||
| 37 | * @var string |
||
| 38 | */ |
||
| 39 | private $type = self::INSERT; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Occurrence Return Code |
||
| 43 | * |
||
| 44 | * @var int |
||
| 45 | */ |
||
| 46 | private $return = 0; |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Occurrence Description |
||
| 50 | * |
||
| 51 | * @var string |
||
| 52 | */ |
||
| 53 | private $description = ''; |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @var DateTime |
||
| 57 | */ |
||
| 58 | private $date; |
||
| 59 | |||
| 60 | 14 | public function __construct( |
|
| 69 | |||
| 70 | /** |
||
| 71 | * @return string |
||
| 72 | */ |
||
| 73 | 1 | public function getType(): string |
|
| 77 | |||
| 78 | /** |
||
| 79 | * @param string $type |
||
| 80 | */ |
||
| 81 | 1 | public function setType(string $type) |
|
| 85 | |||
| 86 | /** |
||
| 87 | * @return int |
||
| 88 | */ |
||
| 89 | 1 | public function getReturn(): int |
|
| 93 | |||
| 94 | /** |
||
| 95 | * @param int $return |
||
| 96 | */ |
||
| 97 | 3 | public function setReturn(int $return = 0) |
|
| 101 | |||
| 102 | /** |
||
| 103 | * @return string |
||
| 104 | */ |
||
| 105 | 1 | public function getDescription(): string |
|
| 109 | |||
| 110 | /** |
||
| 111 | * @param string $description |
||
| 112 | */ |
||
| 113 | 3 | public function setDescription(string $description = '') |
|
| 117 | |||
| 118 | /** |
||
| 119 | * @return DateTime |
||
| 120 | */ |
||
| 121 | 1 | public function getDate(): DateTime |
|
| 125 | |||
| 126 | /** |
||
| 127 | * @param DateTime $date |
||
| 128 | */ |
||
| 129 | 1 | public function setDate(DateTime $date) |
|
| 133 | } |
||
| 134 |