1 | <?php |
||
8 | abstract class Playbook |
||
9 | { |
||
10 | /** |
||
11 | * Run the playbook. |
||
12 | * |
||
13 | * @param \Symfony\Component\Console\Input\InputInterface $input |
||
14 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
||
15 | * @return void |
||
16 | */ |
||
17 | abstract public function run(InputInterface $input, OutputInterface $output): void; |
||
18 | |||
19 | /** |
||
20 | * Run the playbook x amount of times. |
||
21 | * |
||
22 | * @param int $times |
||
23 | * @return \Scaling\Playbook\PlaybookDefenition |
||
24 | */ |
||
25 | public static function times(int $times): PlaybookDefenition |
||
29 | |||
30 | /** |
||
31 | * Only run the playbook once. |
||
32 | * |
||
33 | * @return \Scaling\Playbook\PlaybookDefenition |
||
34 | */ |
||
35 | public static function once(): PlaybookDefenition |
||
39 | |||
40 | /** |
||
41 | * Let the playbook know that it has run. |
||
42 | */ |
||
43 | public function finished(): void |
||
47 | |||
48 | /** |
||
49 | * List of playbooks that have to run before this playbook. |
||
50 | * |
||
51 | * @return array |
||
52 | */ |
||
53 | public function before(): array |
||
57 | |||
58 | /** |
||
59 | * List of playbooks that have to run after this playbook. |
||
60 | * |
||
61 | * @return array |
||
62 | */ |
||
63 | public function after(): array |
||
67 | } |
||
68 |