This commit is contained in:
Andrés Montañez 2014-06-13 09:31:53 -03:00
parent e10dea147f
commit 1b2188f0b1
3 changed files with 2 additions and 3 deletions

View file

@ -33,13 +33,14 @@ class Factory
public static function get($commandName, Config $config)
{
$instance = null;
$commandName = ucwords(str_replace('-', ' ', $commandName));
$commandName = ucwords(str_replace('-', ' ', $commandName));
$commandName = str_replace(' ', '', $commandName);
$commandName = str_replace(' ', '_', ucwords(str_replace('/', ' ', $commandName)));
$className = 'Mage\\Command\\BuiltIn\\' . $commandName . 'Command';
if (Autoload::isLoadable($className)) {
$instance = new $className;
assert($instance instanceOf AbstractCommand);
$instance->setConfig($config);
} else {
throw new Exception('Command not found.');

View file

@ -10,7 +10,6 @@
namespace Mage\Task\BuiltIn\Deployment\Strategy;
use Mage\Task\BuiltIn\Deployment\Strategy\BaseStrategyTaskAbstract;
use Mage\Task\Releases\IsReleaseAware;
/**

View file

@ -10,7 +10,6 @@
namespace Mage\Task\BuiltIn\Deployment\Strategy;
use Mage\Task\BuiltIn\Deployment\Strategy\BaseStrategyTaskAbstract;
use Mage\Task\Releases\IsReleaseAware;
/**