1 | <?php |
||
18 | abstract class AbstractTimeTable extends AbstractService |
||
19 | { |
||
20 | /** |
||
21 | * Seconds of 23:59:59 that mark the day end. |
||
22 | */ |
||
23 | const DAY_END = 86399; |
||
24 | |||
25 | /** |
||
26 | * Time table service. |
||
27 | * |
||
28 | * @var \HDNET\Calendarize\Service\TimeTableService |
||
29 | */ |
||
30 | protected $timeTableService; |
||
31 | |||
32 | public function injectTimeTableService(TimeTableService $timeTableService) |
||
33 | { |
||
34 | $this->timeTableService = $timeTableService; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * Modify the given times via the configuration. |
||
39 | * |
||
40 | * @param array $times |
||
41 | * @param Configuration $configuration |
||
42 | */ |
||
43 | abstract public function handleConfiguration(array &$times, Configuration $configuration); |
||
44 | |||
45 | /** |
||
46 | * Build a single time table by group. |
||
47 | * |
||
48 | * @param ConfigurationGroup $group |
||
49 | * |
||
50 | * @return array |
||
51 | */ |
||
52 | protected function buildSingleTimeTableByGroup(ConfigurationGroup $group) |
||
56 | |||
57 | /** |
||
58 | * Calculate a hash for the key of the given entry. |
||
59 | * This prevent double entries in the index. |
||
60 | * |
||
61 | * @param array $entry |
||
62 | * |
||
63 | * @return string |
||
64 | */ |
||
65 | protected function calculateEntryKey(array $entry) |
||
70 | } |
||
71 |