コード例 #1
0
 protected function configure()
 {
     $this->setName('config:set')->setDescription('Set configuration value');
     foreach ($this->config->getParameters() as $key) {
         $this->addOption($key, NULL, InputOption::VALUE_REQUIRED, $this->config->getDescription($key));
     }
 }
コード例 #2
0
ファイル: ConfigResetCommand.php プロジェクト: totten/amp
 protected function configure()
 {
     $this->setName('config:reset')->setDescription('Reset a configuration value')->addOption('all', 'a', InputOption::VALUE_NONE, 'Reset all listed parameters');
     foreach ($this->config->getParameters() as $key) {
         $this->addOption($key, NULL, InputOption::VALUE_NONE, $this->config->getDescription($key));
     }
 }
コード例 #3
0
ファイル: ConfigSetCommand.php プロジェクト: totten/amp
 protected function configure()
 {
     $this->setName('config:set')->setDescription('Set configuration value');
     foreach ($this->config->getParameters() as $key) {
         $this->addOption($key, NULL, InputOption::VALUE_REQUIRED, $this->config->getDescription($key));
     }
     // Deprecated options.
     $this->addOption('mysql_type', NULL, InputOption::VALUE_REQUIRED, 'Deprecated. See db_type.');
 }
コード例 #4
0
ファイル: ConfigPrompt.php プロジェクト: eileenmcnaughton/amp
 public function __construct(ContainerInterface $container, ConfigRepository $config, $parameter)
 {
     $this->container = $container;
     $this->config = $config;
     $this->parameter = $parameter;
     if ($config && $parameter) {
         $this->description = $this->config->getDescription($parameter);
         $this->example = $this->config->getExample($parameter);
     }
 }
コード例 #5
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);
 }