1 | <?php |
||
9 | final class DeployRevision |
||
10 | { |
||
11 | const SERVICE = 'deploy_revision.worker'; |
||
12 | |||
13 | /** |
||
14 | * DI container. |
||
15 | * |
||
16 | * @var ContainerBuilder |
||
17 | */ |
||
18 | private $container; |
||
19 | |||
20 | 21 | public function __construct() |
|
27 | |||
28 | /** |
||
29 | * @return ContainerBuilder |
||
30 | */ |
||
31 | 4 | public function getContainer() |
|
35 | |||
36 | /** |
||
37 | * @see WorkerInterface::__construct() |
||
38 | * |
||
39 | * @param string $environment |
||
40 | * @param string $versionFile |
||
41 | * |
||
42 | * @return WorkerInterface |
||
43 | */ |
||
44 | 18 | public function getWorker($environment = null, $versionFile = null) |
|
56 | |||
57 | /** |
||
58 | * Verify a service instance. |
||
59 | * |
||
60 | * @param string $id |
||
61 | * Service ID. |
||
62 | * @param string $interface |
||
63 | * FQN of interface which must be implemented by object. |
||
64 | * |
||
65 | * @return mixed |
||
66 | * An object which implements required interface. |
||
67 | * |
||
68 | * @throws \LogicException |
||
69 | * When object not implements required interface. |
||
70 | */ |
||
71 | 18 | private function getService($id, $interface) |
|
81 | } |
||
82 |