Example #1
0
 public function run()
 {
     $key = $this->client->arguments->getArgument(0);
     if (!strlen(trim($key))) {
         throw new InvalidArgumentException('Missing first argument "key" is missing');
     }
     $editor = new Hymn_Tool_BaseConfigEditor("config/config.ini");
     if (!$editor->hasProperty($key, FALSE)) {
         throw new InvalidArgumentException('Base config key "' . $key . '" is missing');
     }
     $current = $editor->getProperty($key);
     Hymn_Client::out($current);
     clearstatcache();
 }
Example #2
0
 public function run()
 {
     $key = $this->client->arguments->getArgument(0);
     if (!strlen(trim($key))) {
         throw new InvalidArgumentException('Missing first argument "key" is missing');
     }
     $editor = new Hymn_Tool_BaseConfigEditor("config/config.ini");
     if (!$editor->hasProperty($key, FALSE)) {
         throw new InvalidArgumentException('Base config key "' . $key . '" is missing');
     }
     if ($editor->isActiveProperty($key)) {
         throw new InvalidArgumentException('Base config key "' . $key . '" already is enabled');
     }
     $editor->activateProperty($key);
     clearstatcache();
 }
Example #3
0
 public function run()
 {
     $key = $this->client->arguments->getArgument(0);
     $value = $this->client->arguments->getArgument(1);
     if (!strlen(trim($key))) {
         throw new InvalidArgumentException('Missing first argument "key" is missing');
     }
     $editor = new Hymn_Tool_BaseConfigEditor("config/config.ini");
     if (!$editor->hasProperty($key, FALSE)) {
         throw new InvalidArgumentException('Base config key "' . $key . '" is missing');
     }
     $current = $editor->getProperty($key, FALSE);
     if (!strlen(trim($value))) {
         $value = trim(Hymn_Client::getInput("Value for '" . $key . "'", $current, array(), FALSE));
     }
     $editor->setProperty($key, $value);
     clearstatcache();
 }