Changeset View
Changeset View
Standalone View
Standalone View
branches/5.3.x/core/kernel/Console/Command/BuildClassMapCommand.php
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | |||||
* | * | ||||
* @param InputInterface $input An InputInterface instance. | * @param InputInterface $input An InputInterface instance. | ||||
* @param OutputInterface $output An OutputInterface instance. | * @param OutputInterface $output An OutputInterface instance. | ||||
* | * | ||||
* @return null|integer | * @return null|integer | ||||
*/ | */ | ||||
protected function execute(InputInterface $input, OutputInterface $output) | protected function execute(InputInterface $input, OutputInterface $output) | ||||
{ | { | ||||
$user_modules = $input->getOption('module'); | $user_modules = $this->io->getOption('module'); | ||||
if ( $user_modules ) { | if ( $user_modules ) { | ||||
$modules_filter = array(); | $modules_filter = array(); | ||||
$valid_modules = $this->getModules(); | $valid_modules = $this->getModules(); | ||||
foreach ( $user_modules as $module_name ) { | foreach ( $user_modules as $module_name ) { | ||||
if ( !in_array($module_name, $valid_modules) ) { | if ( !in_array($module_name, $valid_modules) ) { | ||||
throw new \InvalidArgumentException('Module "' . $module_name . '" not found or installed'); | throw new \InvalidArgumentException('Module "' . $module_name . '" not found or installed'); | ||||
Show All 14 Lines | |||||
// Needed because we aggregate class map from installed modules in unit config cache. | // Needed because we aggregate class map from installed modules in unit config cache. | ||||
$this->Application->HandleEvent(new \kEvent('adm:OnResetParsedData')); | $this->Application->HandleEvent(new \kEvent('adm:OnResetParsedData')); | ||||
$table = $this->getHelper('table'); | $table = $this->getHelper('table'); | ||||
$table | $table | ||||
->setHeaders(array('Path', 'Scanned in', 'Parsed in')) | ->setHeaders(array('Path', 'Scanned in', 'Parsed in')) | ||||
->setRows($table_rows); | ->setRows($table_rows); | ||||
$table->render($output); | $table->render($this->io->getOutput()); | ||||
return 0; | return 0; | ||||
} | } | ||||
/** | /** | ||||
* Return possible values for the named option | * Return possible values for the named option | ||||
* | * | ||||
* @param string $optionName Option name. | * @param string $optionName Option name. | ||||
Show All 39 Lines |