1 | <?php |
||
17 | class Runner |
||
18 | { |
||
19 | /** |
||
20 | * phpbu Factory |
||
21 | * |
||
22 | * @var \phpbu\App\Factory |
||
23 | */ |
||
24 | protected $factory; |
||
25 | |||
26 | /** |
||
27 | * Constructor |
||
28 | * |
||
29 | * @param \phpbu\App\Factory $factory |
||
30 | */ |
||
31 | public function __construct(Factory $factory) |
||
35 | |||
36 | /** |
||
37 | * Factory getter |
||
38 | * |
||
39 | * @return \phpbu\App\Factory |
||
40 | */ |
||
41 | public function getFactory() |
||
45 | |||
46 | /** |
||
47 | * Run phpbu |
||
48 | * |
||
49 | * @param \phpbu\App\Configuration $configuration |
||
50 | * @param \phpbu\App\Factory |
||
51 | * @return \phpbu\App\Result |
||
52 | * @throws \phpbu\App\Exception |
||
53 | */ |
||
54 | public function run(Configuration $configuration) |
||
62 | |||
63 | /** |
||
64 | * Create and register all configured loggers. |
||
65 | * |
||
66 | * @param \phpbu\App\Configuration $configuration |
||
67 | * @param \phpbu\App\Result $result |
||
68 | * @throws \phpbu\App\Exception |
||
69 | */ |
||
70 | private function setupLoggers(Configuration $configuration, Result $result) |
||
85 | |||
86 | /** |
||
87 | * Create a runner executing the requested process. |
||
88 | * |
||
89 | * @param \phpbu\App\Configuration $configuration |
||
90 | * @param \phpbu\App\Result $result |
||
91 | * @return \phpbu\App\Runner\Process |
||
92 | */ |
||
93 | private function createRunner(Configuration $configuration, Result $result) : Process |
||
105 | } |
||
106 |