private function loadModules($modules, $pathPrefix) { foreach ($modules as $definition) { $module = new Module($definition['name'], $pathPrefix . '/' . $definition['path']); $this->modules[$module->getName()] = $module; } }
private function buildModuleList($mods, InputInterface $input, OutputInterface $output) { $modulesToWrite = array(); foreach ($mods as $mod) { $arrPath = explode(DIRECTORY_SEPARATOR, $mod['path']); $module = new Module($arrPath[count($arrPath) - 1], $mod['path']); $output->writeln("Detected {$module->getPath()} as a {$mod['framework']} testable module."); $question = new ConfirmationQuestion("<question>Add {$module->getName()} to config?</question>", false); if (!$this->getHelper('question')->ask($input, $output, $question)) { $output->writeln("<comment>Ignoring {$module->getPath()}</comment>"); } else { $modulesToWrite[] = $module; } } return $modulesToWrite; }
/** * @param Module $module * @return boolean */ public function validateModule(Module $module) { return $this->validatePath($module->getPath()); }