An object to represent a single subcommand used in the command line. Created when you call ConsoleOptionParser::addSubcommand()
Make a new Subcommand
Get the raw help string for this command
Generate the help for this this subcommand.
Get the value of the name attribute.
Get the usage value for this option
Append this subcommand to the Parent element
__construct(array<string, mixed>|string $name, string $help = '', Cake\Console\ConsoleOptionParser|array<string, mixed>|null $parser = null)
Make a new Subcommand
array<string, mixed>|string
$name The long name of the subcommand, or an array with all the properties.
string
$help optional The help text for this option.
Cake\Console\ConsoleOptionParser|array<string, mixed>|null
$parser optional A parser for this subcommand. Either a ConsoleOptionParser, or an array that can be used with ConsoleOptionParser::buildFromArray().
getRawHelp(): string
Get the raw help string for this command
string
help(int $width = 0): string
Generate the help for this this subcommand.
int
$width optional The width to make the name of the subcommand.
string
name(): string
Get the value of the name attribute.
string
parser(): Cake\Console\ConsoleOptionParser|null
Get the usage value for this option
Cake\Console\ConsoleOptionParser|null
xml(SimpleXMLElement $parent): SimpleXMLElement
Append this subcommand to the Parent element
SimpleXMLElement
$parent The parent element.
SimpleXMLElement
Help string for the subcommand
string
Name of the subcommand
string
The ConsoleOptionParser for this subcommand.
Cake\Console\ConsoleOptionParser|null
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.Console.ConsoleInputSubcommand.html