Commit e5237728 authored by drumm's avatar drumm Committed by Neil Drumm

Get named context save basics working

parent bedc152d
<?php
class provisionService_file_local extends provisionService {
class provisionService_file_local extends provisionService_file {
}
......@@ -218,10 +218,10 @@ function drush_provision_hostmaster_make($platform) {
function drush_http_provision_named_context_save() {
if (PROVISION_CONTEXT_SERVER) {
$options = array('provision-host', 'provision-user', 'config_path', 'backup_path');
foreach (provision_service('all') as $service) {
$options = array_merge($options, $service->write_alias());
}
$options = array_merge(
array('provision-host', 'provision-user', 'config_path', 'backup_path'),
d()->services_invoke('write_alias')
);
$config = new provisionConfig_drushrc_alias(drush_get_option('hosting_name'), $options);
$config->write();
}
......
......@@ -235,6 +235,14 @@ class provisionServer extends provisionEnvironment {
function service($service) {
return $this->services[$service];
}
function services_invoke($callback) {
$return = array();
foreach ($this->services as $service) {
$return = array_merge($return, $service->$callback());
}
return $return;
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment