@@ 11-33 (lines=23) @@ | ||
8 | /** |
|
9 | * @author Kevin Bond <[email protected]> |
|
10 | */ |
|
11 | class DoctrineDbalCollection implements CheckCollectionInterface |
|
12 | { |
|
13 | private $checks = []; |
|
14 | ||
15 | public function __construct(ConnectionRegistry $manager, $connections) |
|
16 | { |
|
17 | if (!is_array($connections)) { |
|
18 | $connections = [$connections]; |
|
19 | } |
|
20 | ||
21 | foreach ($connections as $connection) { |
|
22 | $check = new DoctrineDbal($manager, $connection); |
|
23 | $check->setLabel(sprintf('Doctrine DBAL "%s" connection', $connection)); |
|
24 | ||
25 | $this->checks[sprintf('doctrine_dbal_%s_connection', $connection)] = $check; |
|
26 | } |
|
27 | } |
|
28 | ||
29 | public function getChecks() |
|
30 | { |
|
31 | return $this->checks; |
|
32 | } |
|
33 | } |
|
34 |
@@ 11-33 (lines=23) @@ | ||
8 | /** |
|
9 | * @author Hugues Gobet <[email protected]> |
|
10 | */ |
|
11 | class DoctrineMongoDbCollection implements CheckCollectionInterface |
|
12 | { |
|
13 | private $checks = []; |
|
14 | ||
15 | public function __construct(ConnectionRegistry $manager, $connections) |
|
16 | { |
|
17 | if (!is_array($connections)) { |
|
18 | $connections = [$connections]; |
|
19 | } |
|
20 | ||
21 | foreach ($connections as $connection) { |
|
22 | $check = new DoctrineMongoDb($manager, $connection); |
|
23 | $check->setLabel(sprintf('Doctrine Mongo Db "%s" connection', $connection)); |
|
24 | ||
25 | $this->checks[sprintf('doctrine_mongodb_%s_connection', $connection)] = $check; |
|
26 | } |
|
27 | } |
|
28 | ||
29 | public function getChecks() |
|
30 | { |
|
31 | return $this->checks; |
|
32 | } |
|
33 | } |
|
34 |
@@ 11-33 (lines=23) @@ | ||
8 | /** |
|
9 | * @author Kevin Bond <[email protected]> |
|
10 | */ |
|
11 | class ProcessRunningCollection implements CheckCollectionInterface |
|
12 | { |
|
13 | private $checks = []; |
|
14 | ||
15 | public function __construct($processes) |
|
16 | { |
|
17 | if (!is_array($processes)) { |
|
18 | $processes = [$processes]; |
|
19 | } |
|
20 | ||
21 | foreach ($processes as $process) { |
|
22 | $check = new ProcessRunning($process); |
|
23 | $check->setLabel(sprintf('Process "%s" running', $process)); |
|
24 | ||
25 | $this->checks[sprintf('process_%s_running', $process)] = $check; |
|
26 | } |
|
27 | } |
|
28 | ||
29 | public function getChecks() |
|
30 | { |
|
31 | return $this->checks; |
|
32 | } |
|
33 | } |
|
34 |