1 | <?php |
||
17 | class Deployment |
||
18 | { |
||
19 | /** |
||
20 | * Deploy steps |
||
21 | * |
||
22 | * @var StepInterface[] |
||
23 | */ |
||
24 | private $steps = array(); |
||
25 | |||
26 | /** |
||
27 | * Builder for process |
||
28 | * |
||
29 | * @var ProcessBuilder |
||
30 | */ |
||
31 | private $processBuilder; |
||
32 | |||
33 | /** |
||
34 | * @param ProcessBuilder $processBuilder factory to create processes |
||
35 | */ |
||
36 | 18 | public function __construct(ProcessBuilder $processBuilder) |
|
40 | |||
41 | /** |
||
42 | * Adds a whole bunch of steps at once. |
||
43 | * |
||
44 | * @param array $steps List of steps to be added to the deployment. |
||
45 | * |
||
46 | * @return $this |
||
47 | */ |
||
48 | 9 | public function registerSteps(array $steps) |
|
61 | |||
62 | /** |
||
63 | * deploys the steps |
||
64 | * |
||
65 | * @param bool $immediateOutput Forces the Process to dump every output immediately. |
||
66 | * |
||
67 | * @return string |
||
68 | */ |
||
69 | 7 | public function deploy($immediateOutput = false) |
|
106 | |||
107 | /** |
||
108 | * Rests this the current instance. |
||
109 | * |
||
110 | * @return $this |
||
111 | */ |
||
112 | 14 | public function resetSteps() |
|
118 | } |
||
119 |