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