Skip to content

Latest commit

 

History

History
1384 lines (1041 loc) · 37.4 KB

GenerateCommand.md

File metadata and controls

1384 lines (1041 loc) · 37.4 KB

BumbleDocGen / Technical description of the project / Class map / GenerateCommand


namespace BumbleDocGen\Console\Command;

final class GenerateCommand extends \BumbleDocGen\Console\Command\BaseCommand
Base class for all commands.

Initialization methods:

  1. __construct

Methods:

  1. addArgument - Adds an argument.
  2. addOption - Adds an option.
  3. addUsage - Add a command usage example, it'll be prefixed with the command name.
  4. complete - Adds suggestions to $suggestions for the current completion input (e.g. option or argument).
  5. getAliases - Returns the aliases for the command.
  6. getApplication - Gets the application instance for this command.
  7. getDefaultDescription
  8. getDefaultName
  9. getDefinition - Gets the InputDefinition attached to this Command.
  10. getDescription - Returns the description for the command.
  11. getHelp - Returns the help for the command.
  12. getHelper - Gets a helper instance by name.
  13. getHelperSet - Gets the helper set.
  14. getName - Returns the command name.
  15. getNativeDefinition - Gets the InputDefinition to be used to create representations of this Command.
  16. getProcessedHelp - Returns the processed help for the command replacing the %command.name% and %command.full_name% patterns with the real values dynamically.
  17. getSynopsis - Returns the synopsis for the command.
  18. getUsages - Returns alternative usages of the command.
  19. ignoreValidationErrors - Ignores validation errors.
  20. isEnabled - Checks whether the command is enabled or not in the current environment.
  21. isHidden
  22. mergeApplicationDefinition - Merges the application definition with the command definition.
  23. run - Runs the command.
  24. setAliases - Sets the aliases for the command.
  25. setApplication
  26. setCode - Sets the code to execute when running this command.
  27. setDefinition - Sets an array of argument and option instances.
  28. setDescription - Sets the description for the command.
  29. setHelp - Sets the help for the command.
  30. setHelperSet
  31. setHidden
  32. setName - Sets the name of the command.
  33. setProcessTitle - Sets the process title of the command.

Constants:

Method details:

// 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:


// 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:


// 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:


// 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


// 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


// Implemented in Symfony\Component\Console\Command\Command

public function getAliases(): array;
Returns the aliases for the command.

Parameters: not specified

Return value: array


// 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


// Implemented in Symfony\Component\Console\Command\Command

public static function getDefaultDescription(): string|null;

Parameters: not specified

Return value: string | null


// Implemented in Symfony\Component\Console\Command\Command

public static function getDefaultName(): string|null;

Parameters: not specified

Return value: string | null


// 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


// Implemented in Symfony\Component\Console\Command\Command

public function getDescription(): string;
Returns the description for the command.

Parameters: not specified

Return value: string


// Implemented in Symfony\Component\Console\Command\Command

public function getHelp(): string;
Returns the help for the command.

Parameters: not specified

Return value: string


// 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:


// 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


// Implemented in Symfony\Component\Console\Command\Command

public function getName(): string|null;
Returns the command name.

Parameters: not specified

Return value: string | null


// 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


// 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


// 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


// Implemented in Symfony\Component\Console\Command\Command

public function getUsages(): array;
Returns alternative usages of the command.

Parameters: not specified

Return value: array


// Implemented in Symfony\Component\Console\Command\Command

public function ignoreValidationErrors(): mixed;
Ignores validation errors.

Parameters: not specified

Return value: mixed


// 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


// 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


// 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:

See:


// 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:


// 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


// 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:


// 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


// 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


// 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


// 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


// 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


// 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:


// 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