hotfix: Added aliases, implemented new runners
This commit is contained in:
@ -12,8 +12,25 @@ class RunnerFactory
|
||||
public static function createRunner(Hotfix $hotfix)
|
||||
{
|
||||
$facts = Facts::getSystemFacts();
|
||||
$meta = $hotfix->getHeader();
|
||||
|
||||
switch ($meta->getLanguage()) {
|
||||
case 'php':
|
||||
$runner = new PhpRunner();
|
||||
break;
|
||||
case 'bash':
|
||||
$runner = new BashRunner();
|
||||
break;
|
||||
case 'python':
|
||||
$runner = new PythonRunner();
|
||||
break;
|
||||
default:
|
||||
throw new UnsupportedRunnerException("This version of hotfix doesn't support the runner ".$meta->getLanguage());
|
||||
}
|
||||
|
||||
$runner->prepare($hotfix, $facts);
|
||||
|
||||
return $runner;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user