[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Source view] [Print] [Project Stats]
Part of the Joomla Framework Console Package
Copyright: | Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved. |
License: | GNU General Public License version 2 or later; see LICENSE |
File Size: | 591 lines (13 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
__construct(?string $name = null) X-Ref |
Command constructor. param: string|null $name The name of the command; if the name is empty and no default is set, a name must be set in the configure() method |
addArgument(string $name, ?int $mode = null, string $description = '', $default = null) X-Ref |
Adds an argument to the input definition. param: string $name The argument name param: integer $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL param: string $description A description text param: mixed $default The default value (for InputArgument::OPTIONAL mode only) return: $this |
addOption(string $name, $shortcut = null, ?int $mode = null, $description = '', $default = null) X-Ref |
Adds an option to the input definition. param: string $name The option name param: string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts param: integer $mode The option mode: One of the VALUE_* constants param: string $description A description text param: mixed $default The default value (must be null for InputOption::VALUE_NONE) return: $this |
configure() X-Ref |
Configure the command. return: void |
execute(InputInterface $input, OutputInterface $output) X-Ref |
Executes the command. param: InputInterface $input The input to inject into the command. param: OutputInterface $output The output to inject into the command. return: integer The command exit code |
getAliases() X-Ref |
Get the command's aliases. return: string[] |
getApplication() X-Ref |
Get the application object. return: Application The application object. |
getDefaultName() X-Ref |
Get the default command name for this class. This allows a command name to defined and referenced without instantiating the full command class. return: string|null |
getDefinition() X-Ref |
Gets the InputDefinition attached to this command. return: InputDefinition |
getDescription() X-Ref |
Get the command's description. return: string |
getHelp() X-Ref |
Get the command's help. return: string |
getHelperSet() X-Ref |
Get the command's input helper set. return: HelperSet|null |
getName() X-Ref |
Get the command's name. return: string|null |
getProcessedHelp() X-Ref |
Returns the processed help for the command. This method is used to replace placeholders in commands with the real values. By default, this supports `%command.name%` and `%command.full_name`. return: string |
getSynopsis(bool $short = false) X-Ref |
Get the command's synopsis. param: boolean $short Flag indicating whether the short or long version of the synopsis should be returned return: string |
initialise(InputInterface $input, OutputInterface $output) X-Ref |
Internal hook to initialise the command after the input has been bound and before the input is validated. param: InputInterface $input The input to inject into the command. param: OutputInterface $output The output to inject into the command. return: void |
isEnabled() X-Ref |
Check if the command is enabled in this environment. return: boolean |
isHidden() X-Ref |
Check if the command is hidden from the command listing. return: boolean |
mergeApplicationDefinition(bool $mergeArgs = true) X-Ref |
Merges the application definition with the command definition. param: boolean $mergeArgs Flag indicating whether the application's definition arguments should be merged return: void |
setAliases(array $aliases) X-Ref |
Set the command's aliases. param: string[] $aliases The command aliases return: void |
setApplication(?Application $application = null) X-Ref |
Set the command's application. param: Application $application The command's application return: void |
setDefinition($definition) X-Ref |
Sets the input definition for the command. param: array|InputDefinition $definition Either an InputDefinition object or an array of objects to write to the definition. return: void |
setDescription(string $description) X-Ref |
Sets the description for the command. param: string $description The description for the command return: void |
setHelp(string $help) X-Ref |
Sets the help for the command. param: string $help The help for the command return: void |
setHelperSet(HelperSet $helperSet) X-Ref |
Set the command's input helper set. param: HelperSet $helperSet The helper set. return: void |
setHidden(bool $hidden) X-Ref |
Set whether this command is hidden from the command listing. param: boolean $hidden Flag if this command is hidden. return: void |
setName(string $name) X-Ref |
Set the command's name. param: string $name The command name return: void |
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |