Esempio n. 1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     foreach ($this->config->getParameters() as $key) {
         if ($input->getOption($key) !== NULL) {
             $this->config->setParameter($key, $input->getOption($key));
             $this->getContainer()->setParameter($key, $input->getOption($key));
         }
     }
     $this->config->save();
 }
Esempio n. 2
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $rows = array();
     foreach ($this->config->getParameters() as $key) {
         $rows[] = array($key, $this->getContainer()->getParameter($key), $this->config->getDescription($key));
     }
     $table = $this->getApplication()->getHelperSet()->get('table');
     $table->setHeaders(array('Key', 'Value', 'Description'));
     $table->setRows($rows);
     $table->render($output);
 }
Esempio n. 3
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $found = FALSE;
     foreach ($this->config->getParameters() as $key) {
         if ($input->getOption($key) || $input->getOption('all')) {
             $this->config->unsetParameter($key);
             $found = TRUE;
         }
     }
     if ($found) {
         $this->config->save();
     } else {
         $output->writeln('<error>No properties specified</error>');
     }
 }
Esempio n. 4
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     // Deprecated options.
     if ($input->getOption('mysql_type') !== NULL) {
         if ($input->getOption('db_type') === NULL) {
             $input->setOption('db_type', 'mysql_' . $input->getOption('mysql_type'));
             $output->writeln('<error>Option "--mysql_type" is deprecated and will be removed in the future. Please use "--db_type" instead.</error>');
         } else {
             throw new \RuntimeException('Conflicting input. Use "--db_type" instead of "--mysql_type".');
         }
     }
     // Main options.
     foreach ($this->config->getParameters() as $key) {
         if ($input->getOption($key) !== NULL) {
             $this->config->setParameter($key, $input->getOption($key));
             $this->getContainer()->setParameter($key, $input->getOption($key));
         }
     }
     $this->config->save();
 }