本文整理匯總了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());
}