Exemplo n.º 1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $configPrefix = $this->getNewConfigurationPrefix();
     $output->writeln("Created new configuration with configID '{$configPrefix}'");
     $configHolder = new Configuration($configPrefix);
     $configHolder->saveConfiguration();
 }
Exemplo n.º 2
0
 /**
  * prints the LDAP configuration(s)
  * @param string[] configID(s)
  * @param OutputInterface $output
  */
 protected function renderConfigs($configIDs, $output)
 {
     foreach ($configIDs as $id) {
         $configHolder = new Configuration($id);
         $configuration = $configHolder->getConfiguration();
         ksort($configuration);
         $table = $this->getHelperSet()->get('table');
         $table->setHeaders(array('Configuration', $id));
         $rows = array();
         foreach ($configuration as $key => $value) {
             if ($key === 'ldapAgentPassword') {
                 $value = '***';
             }
             if (is_array($value)) {
                 $value = implode(';', $value);
             }
             $rows[] = array($key, $value);
         }
         $table->setRows($rows);
         $table->render($output);
     }
 }
Exemplo n.º 3
0
 /**
  * save the configuration value as provided
  * @param string $configID
  * @param string $configKey
  * @param string $configValue
  */
 protected function setValue($configID, $key, $value)
 {
     $configHolder = new Configuration($configID);
     $configHolder->{$key} = $value;
     $configHolder->saveConfiguration();
 }