@@ 11-29 (lines=19) @@ | ||
8 | /** |
|
9 | * @author Kevin Bond <[email protected]> |
|
10 | */ |
|
11 | class MemcacheCollection implements CheckCollectionInterface |
|
12 | { |
|
13 | private $checks = []; |
|
14 | ||
15 | public function __construct(array $configs) |
|
16 | { |
|
17 | foreach ($configs as $name => $config) { |
|
18 | $check = new Memcache($config['host'], $config['port']); |
|
19 | $check->setLabel(sprintf('Memcache "%s"', $name)); |
|
20 | ||
21 | $this->checks[sprintf('memcache_%s', $name)] = $check; |
|
22 | } |
|
23 | } |
|
24 | ||
25 | public function getChecks() |
|
26 | { |
|
27 | return $this->checks; |
|
28 | } |
|
29 | } |
|
30 |
@@ 11-29 (lines=19) @@ | ||
8 | /** |
|
9 | * @author Kevin Bond <[email protected]> |
|
10 | */ |
|
11 | class MemcachedCollection implements CheckCollectionInterface |
|
12 | { |
|
13 | private $checks = []; |
|
14 | ||
15 | public function __construct(array $configs) |
|
16 | { |
|
17 | foreach ($configs as $name => $config) { |
|
18 | $check = new Memcached($config['host'], $config['port']); |
|
19 | $check->setLabel(sprintf('Memcached "%s"', $name)); |
|
20 | ||
21 | $this->checks[sprintf('memcached_%s', $name)] = $check; |
|
22 | } |
|
23 | } |
|
24 | ||
25 | public function getChecks() |
|
26 | { |
|
27 | return $this->checks; |
|
28 | } |
|
29 | } |
|
30 |
@@ 8-29 (lines=22) @@ | ||
5 | use Laminas\Diagnostics\Check\CheckCollectionInterface; |
|
6 | use Laminas\Diagnostics\Check\PhpFlag; |
|
7 | ||
8 | class PhpFlagsCollection implements CheckCollectionInterface |
|
9 | { |
|
10 | /** |
|
11 | * @var array |
|
12 | */ |
|
13 | private $checks = []; |
|
14 | ||
15 | public function __construct(array $configs) |
|
16 | { |
|
17 | foreach ($configs as $setting => $value) { |
|
18 | $check = new PhpFlag($setting, $value); |
|
19 | $check->setLabel(sprintf('PHP flag "%s"', $setting)); |
|
20 | ||
21 | $this->checks[sprintf('php_flag_%s', $setting)] = $check; |
|
22 | } |
|
23 | } |
|
24 | ||
25 | public function getChecks() |
|
26 | { |
|
27 | return $this->checks; |
|
28 | } |
|
29 | } |
|
30 |
@@ 8-29 (lines=22) @@ | ||
5 | use Laminas\Diagnostics\Check\CheckCollectionInterface; |
|
6 | use Laminas\Diagnostics\Check\PhpVersion; |
|
7 | ||
8 | class PhpVersionCollection implements CheckCollectionInterface |
|
9 | { |
|
10 | /** |
|
11 | * @var array |
|
12 | */ |
|
13 | private $checks = []; |
|
14 | ||
15 | public function __construct(array $configs) |
|
16 | { |
|
17 | foreach ($configs as $version => $comparisonOperator) { |
|
18 | $check = new PhpVersion($version, $comparisonOperator); |
|
19 | $check->setLabel(sprintf('PHP version "%s" "%s"', $comparisonOperator, $version)); |
|
20 | ||
21 | $this->checks[sprintf('php_version_%s', $version)] = $check; |
|
22 | } |
|
23 | } |
|
24 | ||
25 | public function getChecks() |
|
26 | { |
|
27 | return $this->checks; |
|
28 | } |
|
29 | } |
|
30 |