An object to represent a single subcommand used in the command line.
Created when you call ConsoleOptionParser::addSubcommand()
__construct(mixed $name, mixed $help, mixed $parser)
Make a new Subcommand
string|array $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|null $parser optional A parser for this subcommand. Either a ConsoleOptionParser, or an array that can be used with ConsoleOptionParser::buildFromArray().
getRawHelp()
Get the raw help string for this command
stringhelp(int $width)
Generate the help for this this subcommand.
int $width optional The width to make the name of the subcommand.
stringname()
Get the value of the name attribute.
stringValue of this->_name.
parser()
Get the usage value for this option
\Cake\Console\ConsoleOptionParser|nullxml(\SimpleXMLElement $parent)
Append this subcommand to the Parent element
\SimpleXMLElement $parent The parent element.
\SimpleXMLElementThe parent with this subcommand appended.
Help string for the subcommand
stringName of the subcommand
stringThe 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.1/class-Cake.Console.ConsoleInputSubcommand.html