bootstrapping: add a dispatchModule() shortcut

This allows to easily jump into a specific modules CLI controllers.

refs #6411
This commit is contained in:
Thomas Gelf 2014-06-04 23:39:12 +00:00
parent 4202e34d13
commit 8df26bb5f5
1 changed files with 7 additions and 0 deletions

View File

@ -124,6 +124,13 @@ class Cli extends ApplicationBootstrap
return $this->params;
}
public function dispatchModule($name, $basedir = null)
{
$this->getModuleManager()->loadModule($name, $basedir);
$this->cliLoader()->setModuleName($name);
$this->dispatch();
}
public function dispatch()
{
Benchmark::measure('Dispatching CLI command');