PPI\Framework\Console\Command\ModuleCreateCommand::setTargetModuleDir PHP Метод

setTargetModuleDir() публичный Метод

public setTargetModuleDir ( string $moduleDir )
$moduleDir string
    public function setTargetModuleDir($moduleDir)
    {
        $this->modulesDir = realpath($moduleDir);
    }

Usage Example

Пример #1
0
 protected function registerCommands()
 {
     $this->app->boot();
     $config = $this->app->getConfig();
     $commands = array(new Command\AssetsInstallCommand(), new Command\CacheClearCommand(), new Command\ConfigDebugCommand(), new Command\ModuleDebugCommand(), new Command\RouterDebugCommand(), new Command\RouterMatchCommand(), new Command\ServiceManagerDebugCommand());
     if (isset($config['module_listener_options']['module_paths'][0], $config['framework']['skeleton_module']['path'])) {
         $moduleCreateCommand = new Command\ModuleCreateCommand();
         $moduleCreateCommand->setSkeletonModuleDir($config['framework']['skeleton_module']['path']);
         $moduleCreateCommand->setTargetModuleDir($config['module_listener_options']['module_paths'][0]);
         // Enabled templating engines
         if (isset($config['framework']['templating']['engines'])) {
             $moduleCreateCommand->setEnabledTemplatingEngines($config['framework']['templating']['engines']);
         }
         $commands[] = $moduleCreateCommand;
     }
     $this->addCommands($commands);
     // Commands found in active Modules
     foreach ($this->app->getModules() as $module) {
         if ($module instanceof AbstractModule) {
             $module->registerCommands($this);
         }
     }
 }