BumbleDocGen / Technical description of the project / Class map / AddDocBlocksCommand
AddDocBlocksCommand class:
namespace BumbleDocGen\AI\Console;
final class AddDocBlocksCommand extends \BumbleDocGen\Console\Command\BaseCommandBase class for all commands.
- addArgument - Adds an argument.
- addOption - Adds an option.
- addUsage - Add a command usage example, it'll be prefixed with the command name.
- complete - Adds suggestions to $suggestions for the current completion input (e.g. option or argument).
- getAliases - Returns the aliases for the command.
- getApplication - Gets the application instance for this command.
- getDefaultDescription
- getDefaultName
- getDefinition - Gets the InputDefinition attached to this Command.
- getDescription - Returns the description for the command.
- getHelp - Returns the help for the command.
- getHelper - Gets a helper instance by name.
- getHelperSet - Gets the helper set.
- getName - Returns the command name.
- getNativeDefinition - Gets the InputDefinition to be used to create representations of this Command.
- getProcessedHelp - Returns the processed help for the command replacing the %command.name% and %command.full_name% patterns with the real values dynamically.
- getSynopsis - Returns the synopsis for the command.
- getUsages - Returns alternative usages of the command.
- ignoreValidationErrors - Ignores validation errors.
- isEnabled - Checks whether the command is enabled or not in the current environment.
- isHidden
- mergeApplicationDefinition - Merges the application definition with the command definition.
- run - Runs the command.
- setAliases - Sets the aliases for the command.
- setApplication
- setCode - Sets the code to execute when running this command.
- setDefinition - Sets an array of argument and option instances.
- setDescription - Sets the description for the command.
- setHelp - Sets the help for the command.
- setHelperSet
- setHidden
- setName - Sets the name of the command.
- setProcessTitle - Sets the process title of the command.
- #
FAILURE| source code - #
INVALID| source code - #
NAME| source code - #
SUCCESS| source code
- # __construct | source code
// Implemented in BumbleDocGen\Console\Command\BaseCommand
public function __construct(string $name = null);Parameters:
| Name | Type | Description |
|---|---|---|
| $name | string | The name of the command; passing null means it must be set in configure() |
Throws:
- \Symfony\Component\Console\Exception\LogicException - When the command name is empty
- # addArgument | source code
// Implemented in Symfony\Component\Console\Command\Command
public function addArgument(string $name, int $mode = null, string $description = '', mixed $default = null): static;Adds an argument.
Parameters:
| Name | Type | Description |
|---|---|---|
| $name | string | - |
| $mode | int | The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL |
| $description | string | - |
| $default | mixed | The default value (for InputArgument::OPTIONAL mode only) |
Return value: static
Throws:
- \Symfony\Component\Console\Exception\InvalidArgumentException - When argument mode is not valid
- # addOption | source code
// Implemented in Symfony\Component\Console\Command\Command
public function addOption(string $name, string|array $shortcut = null, int $mode = null, string $description = '', mixed $default = null): static;Adds an option.
Parameters:
| Name | Type | Description |
|---|---|---|
| $name | string | - |
| $shortcut | string | array | The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts |
| $mode | int | The option mode: One of the InputOption::VALUE_* constants |
| $description | string | - |
| $default | mixed | The default value (must be null for InputOption::VALUE_NONE) |
Return value: static
Throws:
- \Symfony\Component\Console\Exception\InvalidArgumentException - If option mode is invalid or incompatible
- # addUsage | source code
// Implemented in Symfony\Component\Console\Command\Command
public function addUsage(string $usage): static;Add a command usage example, it'll be prefixed with the command name.
Parameters:
| Name | Type | Description |
|---|---|---|
| $usage | string | - |
Return value: static
- # complete | source code
// Implemented in Symfony\Component\Console\Command\Command
public function complete(\Symfony\Component\Console\Completion\CompletionInput $input, \Symfony\Component\Console\Completion\CompletionSuggestions $suggestions): void;Adds suggestions to $suggestions for the current completion input (e.g. option or argument).
Parameters:
| Name | Type | Description |
|---|---|---|
| $input | \Symfony\Component\Console\Completion\CompletionInput | - |
| $suggestions | \Symfony\Component\Console\Completion\CompletionSuggestions | - |
Return value: void
- # getAliases | source code
// Implemented in Symfony\Component\Console\Command\Command
public function getAliases(): array;Returns the aliases for the command.
Parameters: not specified
Return value: array
- # getApplication | source code
// Implemented in Symfony\Component\Console\Command\Command
public function getApplication(): \Symfony\Component\Console\Application|null;Gets the application instance for this command.
Parameters: not specified
Return value: \Symfony\Component\Console\Application | null
- # getDefaultDescription | source code
// Implemented in Symfony\Component\Console\Command\Command
public static function getDefaultDescription(): string|null;Parameters: not specified
- # getDefaultName | source code
// Implemented in Symfony\Component\Console\Command\Command
public static function getDefaultName(): string|null;Parameters: not specified
- # getDefinition | source code
// Implemented in Symfony\Component\Console\Command\Command
public function getDefinition(): \Symfony\Component\Console\Input\InputDefinition;Gets the InputDefinition attached to this Command.
Parameters: not specified
Return value: \Symfony\Component\Console\Input\InputDefinition
- # getDescription | source code
// Implemented in Symfony\Component\Console\Command\Command
public function getDescription(): string;Returns the description for the command.
Parameters: not specified
Return value: string
- # getHelp | source code
// Implemented in Symfony\Component\Console\Command\Command
public function getHelp(): string;Returns the help for the command.
Parameters: not specified
Return value: string
- # getHelper | source code
// Implemented in Symfony\Component\Console\Command\Command
public function getHelper(string $name): mixed;Gets a helper instance by name.
Parameters:
| Name | Type | Description |
|---|---|---|
| $name | string | - |
Return value: mixed
Throws:
- \Symfony\Component\Console\Exception\LogicException - if no HelperSet is defined
- \Symfony\Component\Console\Exception\InvalidArgumentException - if the helper is not defined
- # getHelperSet | source code
// Implemented in Symfony\Component\Console\Command\Command
public function getHelperSet(): \Symfony\Component\Console\Helper\HelperSet|null;Gets the helper set.
Parameters: not specified
Return value: \Symfony\Component\Console\Helper\HelperSet | null
- # getName | source code
// Implemented in Symfony\Component\Console\Command\Command
public function getName(): string|null;Returns the command name.
Parameters: not specified
- # getNativeDefinition | source code
// Implemented in Symfony\Component\Console\Command\Command
public function getNativeDefinition(): \Symfony\Component\Console\Input\InputDefinition;Gets the InputDefinition to be used to create representations of this Command.
Parameters: not specified
Return value: \Symfony\Component\Console\Input\InputDefinition
- # getProcessedHelp | source code
// Implemented in Symfony\Component\Console\Command\Command
public function getProcessedHelp(): string;Returns the processed help for the command replacing the %command.name% and %command.full_name% patterns with the real values dynamically.
Parameters: not specified
Return value: string
- # getSynopsis | source code
// Implemented in Symfony\Component\Console\Command\Command
public function getSynopsis(bool $short = false): string;Returns the synopsis for the command.
Parameters:
| Name | Type | Description |
|---|---|---|
| $short | bool | Whether to show the short version of the synopsis (with options folded) or not |
Return value: string
- # getUsages | source code
// Implemented in Symfony\Component\Console\Command\Command
public function getUsages(): array;Returns alternative usages of the command.
Parameters: not specified
Return value: array
- # ignoreValidationErrors | source code
// Implemented in Symfony\Component\Console\Command\Command
public function ignoreValidationErrors(): mixed;Ignores validation errors.
Parameters: not specified
Return value: mixed
- # isEnabled | source code
// Implemented in Symfony\Component\Console\Command\Command
public function isEnabled(): bool;Checks whether the command is enabled or not in the current environment.
Parameters: not specified
Return value: bool
- # isHidden | source code
// Implemented in Symfony\Component\Console\Command\Command
public function isHidden(): bool;Parameters: not specified
Return value: bool
- #
mergeApplicationDefinition
⚠️ Is internal | source code
// Implemented in Symfony\Component\Console\Command\Command
public function mergeApplicationDefinition(bool $mergeArgs = true): mixed;Merges the application definition with the command definition.
Parameters:
| Name | Type | Description |
|---|---|---|
| $mergeArgs | bool | Whether to merge or not the Application definition arguments to Command definition arguments |
Return value: mixed
- # run | source code
// Implemented in Symfony\Component\Console\Command\Command
public function run(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output): int;Runs the command.
Parameters:
| Name | Type | Description |
|---|---|---|
| $input | \Symfony\Component\Console\Input\InputInterface | - |
| $output | \Symfony\Component\Console\Output\OutputInterface | - |
Return value: int
Throws:
- \Symfony\Component\Console\Exception\ExceptionInterface - When input binding fails. Bypass this by calling {@link ignoreValidationErrors()}.
See:
- # setAliases | source code
// Implemented in Symfony\Component\Console\Command\Command
public function setAliases(iterable $aliases): static;Sets the aliases for the command.
Parameters:
| Name | Type | Description |
|---|---|---|
| $aliases | iterable | An array of aliases for the command |
Return value: static
Throws:
- \Symfony\Component\Console\Exception\InvalidArgumentException - When an alias is invalid
- # setApplication | source code
// Implemented in Symfony\Component\Console\Command\Command
public function setApplication(\Symfony\Component\Console\Application $application = null): mixed;Parameters:
| Name | Type | Description |
|---|---|---|
| $application | \Symfony\Component\Console\Application | - |
Return value: mixed
- # setCode | source code
// Implemented in Symfony\Component\Console\Command\Command
public function setCode(callable $code): static;Sets the code to execute when running this command.
Parameters:
| Name | Type | Description |
|---|---|---|
| $code | callable | A callable(InputInterface $input, OutputInterface $output) |
Return value: static
Throws:
See:
- # setDefinition | source code
// Implemented in Symfony\Component\Console\Command\Command
public function setDefinition(array|\Symfony\Component\Console\Input\InputDefinition $definition): static;Sets an array of argument and option instances.
Parameters:
| Name | Type | Description |
|---|---|---|
| $definition | array | \Symfony\Component\Console\Input\InputDefinition | - |
Return value: static
- # setDescription | source code
// Implemented in Symfony\Component\Console\Command\Command
public function setDescription(string $description): static;Sets the description for the command.
Parameters:
| Name | Type | Description |
|---|---|---|
| $description | string | - |
Return value: static
- # setHelp | source code
// Implemented in Symfony\Component\Console\Command\Command
public function setHelp(string $help): static;Sets the help for the command.
Parameters:
| Name | Type | Description |
|---|---|---|
| $help | string | - |
Return value: static
- # setHelperSet | source code
// Implemented in Symfony\Component\Console\Command\Command
public function setHelperSet(\Symfony\Component\Console\Helper\HelperSet $helperSet): mixed;Parameters:
| Name | Type | Description |
|---|---|---|
| $helperSet | \Symfony\Component\Console\Helper\HelperSet | - |
Return value: mixed
- # setHidden | source code
// Implemented in Symfony\Component\Console\Command\Command
public function setHidden(bool $hidden = true): static;Parameters:
| Name | Type | Description |
|---|---|---|
| $hidden | bool | Whether or not the command should be hidden from the list of commands |
Return value: static
- # setName | source code
// Implemented in Symfony\Component\Console\Command\Command
public function setName(string $name): static;Sets the name of the command.
Parameters:
| Name | Type | Description |
|---|---|---|
| $name | string | - |
Return value: static
Throws:
- \Symfony\Component\Console\Exception\InvalidArgumentException - When the name is invalid
- # setProcessTitle | source code
// Implemented in Symfony\Component\Console\Command\Command
public function setProcessTitle(string $title): static;Sets the process title of the command.
Parameters:
| Name | Type | Description |
|---|---|---|
| $title | string | - |
Return value: static