1 | <?php |
||
17 | class CalendarResponse { |
||
18 | |||
19 | const VALID_STATE = 'valid_state'; |
||
20 | const INVALID_STATE = 'invalid_state'; |
||
21 | const CONSTRAINT = 'constraint'; |
||
22 | |||
23 | /** |
||
24 | * @var array |
||
25 | */ |
||
26 | protected $included_set; |
||
27 | |||
28 | /** |
||
29 | * @var array |
||
30 | */ |
||
31 | protected $excluded_set; |
||
32 | |||
33 | /** |
||
34 | * @var \DateTime |
||
35 | */ |
||
36 | protected $start_date; |
||
37 | |||
38 | /** |
||
39 | * @var \DateTime |
||
40 | */ |
||
41 | protected $end_date; |
||
42 | |||
43 | /** |
||
44 | * @var array |
||
45 | */ |
||
46 | protected $valid_states; |
||
47 | |||
48 | /** |
||
49 | * @param $start_date |
||
50 | * @param $end_date |
||
51 | * @param $valid_states |
||
52 | * @param $included |
||
53 | * @param $excluded |
||
54 | */ |
||
55 | public function __construct(\DateTime $start_date, \DateTime $end_date, $valid_states, $included = array(), $excluded = array()) { |
||
62 | |||
63 | /** |
||
64 | * @param $unit |
||
65 | * @param $reason |
||
66 | */ |
||
67 | public function addMatch(UnitInterface $unit, $reason = '') { |
||
73 | |||
74 | /** |
||
75 | * @param $unit |
||
76 | * @param $reason |
||
77 | */ |
||
78 | public function addMiss(UnitInterface $unit, $reason = '', Constraint $constraint = NULL) { |
||
88 | |||
89 | /** |
||
90 | * @return array |
||
91 | */ |
||
92 | public function getIncluded() { |
||
95 | |||
96 | /** |
||
97 | * @return array |
||
98 | */ |
||
99 | public function getExcluded() { |
||
102 | |||
103 | /** |
||
104 | * @return DateTime |
||
105 | */ |
||
106 | public function getStartDate() { |
||
109 | |||
110 | /** |
||
111 | * @return DateTime |
||
112 | */ |
||
113 | public function getEndDate() { |
||
116 | |||
117 | /** |
||
118 | * @param $unit |
||
119 | * @param $reason |
||
120 | * |
||
121 | * @return bool |
||
122 | */ |
||
123 | public function removeFromMatched(UnitInterface $unit, $reason = '', Constraint $constraint = NULL) { |
||
133 | |||
134 | /** |
||
135 | * @param $constraints |
||
136 | */ |
||
137 | public function applyConstraints($constraints) { |
||
142 | |||
143 | } |
||
144 |