Exemplo n.º 1
0
 private function init_config()
 {
     $configurator = \Terminus::get_configurator();
     list($args, $assoc_args, $runtime_config) = $configurator->parse_args(array_slice($GLOBALS['argv'], 1));
     $this->arguments = $args;
     $this->assoc_args = $assoc_args;
     $configurator->merge_array($runtime_config);
     list($this->config, $this->extra_config) = $configurator->to_array();
 }
Exemplo n.º 2
0
 function get_longdesc()
 {
     $binding = array();
     foreach (\Terminus::get_configurator()->get_spec() as $key => $details) {
         if ($details['runtime'] === false || isset($details['deprecated']) || isset($details['hidden'])) {
             continue;
         }
         if ($details['runtime']) {
             $synopsis = "--[no-]{$key}";
         } else {
             $synopsis = "--{$key}" . $details['runtime'];
         }
         $binding['parameters'][] = array('synopsis' => $synopsis, 'desc' => $details['desc']);
     }
     if ((bool) \Terminus::get_config('json')) {
         return $binding;
     }
     return Utils\mustache_render('man-params.mustache', $binding);
 }
Exemplo n.º 3
0
 /**
  * Dump the list of global parameters, as JSON.
  *
  * @subcommand param-dump
  */
 function param_dump()
 {
     $this->output()->outputDump(\Terminus::get_configurator()->get_spec());
 }
Exemplo n.º 4
0
 /**
  * Dump the list of global parameters, as JSON.
  *
  * @subcommand param-dump
  */
 function param_dump()
 {
     echo \Terminus\Utils\json_dump(\Terminus::get_configurator()->get_spec());
 }