summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Pugh2017-10-25 20:36:53 (GMT)
committerJon Pugh2017-10-25 20:36:53 (GMT)
commit121044e6e0c06c9b5c8366311fa2baf5a57d7c4c (patch)
tree5e4fa13306bc112c5978efef3f0edbdc0cbc4fe5
parent5f540724d70b3574fcd1fd6b892c58a5a7d43c65 (diff)
Fixing loading of services by service type.
-rw-r--r--src/Application.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Application.php b/src/Application.php
index dd3bdc0..fb0480d 100644
--- a/src/Application.php
+++ b/src/Application.php
@@ -165,7 +165,7 @@ class Application extends BaseApplication
$class = '\Aegir\Provision\Context\\' . ucfirst($context_type) . "Context";
$contexts[$context_name] = new $class($context_name, $this->config->all(), $this);
}
-
+
if ($name) {
return $contexts[$name];
}
@@ -220,11 +220,11 @@ class Application extends BaseApplication
public function getServerOptions($service_type = '') {
$servers = [];
foreach ($this->getAllServers() as $server) {
- if ($service_type && isset($server->services[$service_type])) {
- $servers[$server->name] = $server->name . ': ' . $server->getService($service_type)->type;
+ if ($service_type && !empty($server->config['services'][$service_type])) {
+ $servers[$server->name] = $server->name . ': ' . $server->config['services'][$service_type]['type'];
}
- else {
- $servers[$server->name] = $server->name . ': ' . $server->getService($service_type)->type;
+ elseif ($service_type == '') {
+ $servers[$server->name] = $server->name . ': ' . $server->config['services'][$service_type]['type'];
}
}
return $servers;