Beispiel #1
0
 /**
  * @param InputInterface  $input
  * @param OutputInterface $output
  */
 public function execute(InputInterface $input, OutputInterface $output)
 {
     // tworzenie katalogu głównego /app
     $app = AbstractApp::getStpaConfig('core.app');
     if (!file_exists($app)) {
         UtilFilesystem::checkDir(dirname($app), true);
         $output->writeln("<info>Tworzenie katalogu: </info><comment>{$app}</comment>");
         mkdir($app);
     }
     $list = $this->_findPartsClasses();
     if ($input->getOption('list') === false) {
         foreach ($list as $cls) {
             /* @var $cls AbstractInstallerPart */
             $cls->install($input, $output);
         }
     } else {
         $tmp = array();
         foreach ($list as $cls) {
             /* @var $cls AbstractInstallerPart */
             $tmp[] = str_pad($cls->getPrior(), 8, ' ', STR_PAD_LEFT) . ' : ' . get_class($cls);
         }
         $output->writeln(implode("\n", $tmp));
     }
 }