本文整理汇总了PHP中Terminus::get_configurator方法的典型用法代码示例。如果您正苦于以下问题:PHP Terminus::get_configurator方法的具体用法?PHP Terminus::get_configurator怎么用?PHP Terminus::get_configurator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Terminus
的用法示例。
在下文中一共展示了Terminus::get_configurator方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init_config
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();
}
示例2: get_longdesc
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);
}
示例3: param_dump
/**
* Dump the list of global parameters, as JSON.
*
* @subcommand param-dump
*/
function param_dump()
{
$this->output()->outputDump(\Terminus::get_configurator()->get_spec());
}
示例4: param_dump
/**
* Dump the list of global parameters, as JSON.
*
* @subcommand param-dump
*/
function param_dump()
{
echo \Terminus\Utils\json_dump(\Terminus::get_configurator()->get_spec());
}