lithium\console\command\Help::_renderUsage PHP Метод

_renderUsage() защищенный Метод

Output the formatted usage.
См. также: lithium\console\command\Help::_methods()
См. также: lithium\console\command\Help::_properties()
protected _renderUsage ( string $command, array $method, array $properties = [] ) : void
$command string The name of the command.
$method array Information about the method of the command to render usage for.
$properties array From `_properties()`.
Результат void
    protected function _renderUsage($command, $method, $properties = array())
    {
        $params = array_reduce($properties, function ($a, $b) {
            return "{$a} {$b['usage']}";
        });
        $args = array_reduce($method['args'], function ($a, $b) {
            return "{$a} {$b['usage']}";
        });
        $format = "{:command}li3 %s%s{:end}{:command}%s{:end}{:option}%s{:end}";
        $name = $method['name'] == 'run' ? '' : " {$method['name']}";
        $this->out($this->_pad(sprintf($format, $command ?: 'COMMAND', $name, $params, $args)));
    }