Commit 699bb1d1 authored by Jon Pugh's avatar Jon Pugh

Dynamically load a a new TypeContext() class in Provision save command.

parent ca23dd4e
......@@ -81,10 +81,12 @@ class SaveCommand extends Command
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$server = new ServerContext($input->getArgument('context_name'), $input->getOptions(), $this->getApplication()->getConfig()->all());
$class = '\Aegir\Provision\Context\\' . ucfirst($input->getOption('context_type')) . "Context";
$context = new $class($input->getArgument('context_name'), $input->getOptions(), $this->getApplication()->getConfig()->all());
$output->writeln(
"Saving context: ".print_r($server,1)
"Saving context: ".print_r($context,1)
);
// $command = 'drush provision-save '.$input->getArgument('context_name');
......
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