1 | <?php |
||
7 | class CronUpdater |
||
8 | { |
||
9 | public const KEY_BEGIN = '# KEY %key%'; |
||
10 | public const KEY_END = '# END'; |
||
11 | |||
12 | /** @var CronManipulator */ |
||
13 | private $cronManipulator; |
||
14 | |||
15 | public function __construct(CronManipulator $cronManipulator) |
||
19 | |||
20 | public static function createDefault(): self |
||
24 | |||
25 | public function replaceWith(Cron $cron): void |
||
29 | |||
30 | public function updateWith(Cron $cron, string $key): void |
||
34 | |||
35 | private function updateContent(Cron $cron, string $key): string |
||
49 | |||
50 | private function wrapInKey(Cron $cron, string $key): string |
||
54 | |||
55 | private function beginKey(string $key): string |
||
59 | |||
60 | private function appendContent(Cron $cron, string $key, string $content): string |
||
64 | } |
||
65 |