Extends
lithium\console\Command
Output the formatted usage.
Parameters
- string $command The name of the command.
- array $method Information about the method of the command to render usage for.
- array $properties From `_properties()`.
Returns
voidSource
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']}";
});
$this->out($this->_pad(sprintf(
"{:command}li3 %s%s{:end}{:command}%s{:end}{:option}%s{:end}",
$command ?: 'COMMAND',
$method['name'] == 'run' ? '' : " {$method['name']}",
$params,
$args
)));
}