1 | <?php |
||
9 | class Supervisor implements SupervisorInterface |
||
10 | { |
||
11 | /** |
||
12 | * @var ProcessBuilderFactoryInterface |
||
13 | */ |
||
14 | private $processBuilderFactory; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | private $path; |
||
20 | |||
21 | /** |
||
22 | * @param ProcessBuilderFactoryInterface $processBuilderFactory |
||
23 | * @param array $config |
||
24 | */ |
||
25 | 10 | public function __construct(ProcessBuilderFactoryInterface $processBuilderFactory, array $config) |
|
30 | |||
31 | /** |
||
32 | * @inheritdoc |
||
33 | */ |
||
34 | 8 | public function isRunning() |
|
40 | |||
41 | /** |
||
42 | * @inheritdoc |
||
43 | */ |
||
44 | 2 | public function start() |
|
58 | |||
59 | /** |
||
60 | * @inheritdoc |
||
61 | */ |
||
62 | 2 | public function stop() |
|
70 | |||
71 | /** |
||
72 | * @inheritdoc |
||
73 | */ |
||
74 | 2 | public function reload() |
|
83 | |||
84 | /** |
||
85 | * @inheritdoc |
||
86 | */ |
||
87 | 1 | public function restart() |
|
91 | |||
92 | /** |
||
93 | * @inheritdoc |
||
94 | */ |
||
95 | 1 | public function getProcessId() { |
|
99 | |||
100 | /** |
||
101 | * @param string $cmd supervisorctl command |
||
102 | * |
||
103 | * @return ProcessInterface |
||
104 | */ |
||
105 | 10 | private function execute($cmd) |
|
120 | } |
||
121 |