Skip to content

Latest commit

 

History

History
1469 lines (1106 loc) · 37.4 KB

App.md

File metadata and controls

1469 lines (1106 loc) · 37.4 KB

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


App class:

namespace BumbleDocGen\Console;

class App extends \Symfony\Component\Console\Application
An Application is the container for a collection of commands.

Initialization methods:

  1. __construct

Methods:

  1. add - Adds a command object.
  2. addCommands - Adds an array of command objects.
  3. all - Gets the commands (registered in the given namespace if provided).
  4. areExceptionsCaught - Gets whether to catch exceptions or not during commands execution.
  5. complete - Adds suggestions to $suggestions for the current completion input (e.g. option or argument).
  6. doRun - Runs the current application.
  7. extractNamespace - Returns the namespace part of the command name.
  8. find - Finds a command by name or alias.
  9. findNamespace - Finds a registered namespace by a name or an abbreviation.
  10. get - Returns a registered command by name or alias.
  11. getAbbreviations - Returns an array of possible abbreviations given a set of names.
  12. getDefinition - Gets the InputDefinition related to this Application.
  13. getHelp - Gets the help message.
  14. getHelperSet - Get the helper set associated with the command.
  15. getLongVersion - Returns the long version of the application.
  16. getName - Gets the name of the application.
  17. getNamespaces - Returns an array of all unique namespaces used by currently registered commands.
  18. getSignalRegistry
  19. getVersion - Gets the application version.
  20. has - Returns true if the command exists, false otherwise.
  21. isAutoExitEnabled - Gets whether to automatically exit after a command execution or not.
  22. isSingleCommand
  23. register - Registers a new command.
  24. renderThrowable
  25. reset
  26. run - Runs the current application.
  27. setAutoExit - Sets whether to automatically exit after a command execution or not.
  28. setCatchExceptions - Sets whether to catch exceptions or not during commands execution.
  29. setCommandLoader
  30. setDefaultCommand - Sets the default Command name.
  31. setDefinition
  32. setDispatcher
  33. setHelperSet
  34. setName - Sets the application name.
  35. setSignalsToDispatchEvent
  36. setVersion - Sets the application version.

Method details:

public function __construct();

Parameters: not specified


// Implemented in Symfony\Component\Console\Application

public function add(\Symfony\Component\Console\Command\Command $command): \Symfony\Component\Console\Command\Command|null;
Adds a command object.

Parameters:

Name Type Description
$command \Symfony\Component\Console\Command\Command -

Return value: \Symfony\Component\Console\Command\Command | null


// Implemented in Symfony\Component\Console\Application

public function addCommands(array $commands): mixed;
Adds an array of command objects.

Parameters:

Name Type Description
$commands array An array of commands

Return value: mixed


// Implemented in Symfony\Component\Console\Application

public function all(string $namespace = null): \Symfony\Component\Console\Command\Command[];
Gets the commands (registered in the given namespace if provided).

Parameters:

Name Type Description
$namespace string -

Return value: \Symfony\Component\Console\Command\Command[]


// Implemented in Symfony\Component\Console\Application

public function areExceptionsCaught(): bool;
Gets whether to catch exceptions or not during commands execution.

Parameters: not specified

Return value: bool


// Implemented in Symfony\Component\Console\Application

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\Application

public function doRun(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output): int;
Runs the current application.

Parameters:

Name Type Description
$input \Symfony\Component\Console\Input\InputInterface -
$output \Symfony\Component\Console\Output\OutputInterface -

Return value: int


// Implemented in Symfony\Component\Console\Application

public function extractNamespace(string $name, int $limit = null): string;
Returns the namespace part of the command name.

Parameters:

Name Type Description
$name string -
$limit int -

Return value: string


// Implemented in Symfony\Component\Console\Application

public function find(string $name): \Symfony\Component\Console\Command\Command;
Finds a command by name or alias.

Parameters:

Name Type Description
$name string -

Return value: \Symfony\Component\Console\Command\Command

Throws:


// Implemented in Symfony\Component\Console\Application

public function findNamespace(string $namespace): string;
Finds a registered namespace by a name or an abbreviation.

Parameters:

Name Type Description
$namespace string -

Return value: string

Throws:


// Implemented in Symfony\Component\Console\Application

public function get(string $name): \Symfony\Component\Console\Command\Command;
Returns a registered command by name or alias.

Parameters:

Name Type Description
$name string -

Return value: \Symfony\Component\Console\Command\Command

Throws:


// Implemented in Symfony\Component\Console\Application

public static function getAbbreviations(array $names): array;
Returns an array of possible abbreviations given a set of names.

Parameters:

Name Type Description
$names array -

Return value: array


// Implemented in Symfony\Component\Console\Application

public function getDefinition(): \Symfony\Component\Console\Input\InputDefinition;
Gets the InputDefinition related to this Application.

Parameters: not specified

Return value: \Symfony\Component\Console\Input\InputDefinition


// Implemented in Symfony\Component\Console\Application

public function getHelp(): string;
Gets the help message.

Parameters: not specified

Return value: string


// Implemented in Symfony\Component\Console\Application

public function getHelperSet(): \Symfony\Component\Console\Helper\HelperSet;
Get the helper set associated with the command.

Parameters: not specified

Return value: \Symfony\Component\Console\Helper\HelperSet


// Implemented in Symfony\Component\Console\Application

public function getLongVersion(): string;
Returns the long version of the application.

Parameters: not specified

Return value: string


// Implemented in Symfony\Component\Console\Application

public function getName(): string;
Gets the name of the application.

Parameters: not specified

Return value: string


// Implemented in Symfony\Component\Console\Application

public function getNamespaces(): array;
Returns an array of all unique namespaces used by currently registered commands.

Parameters: not specified

Return value: array


// Implemented in Symfony\Component\Console\Application

public function getSignalRegistry(): \Symfony\Component\Console\SignalRegistry\SignalRegistry;

Parameters: not specified

Return value: \Symfony\Component\Console\SignalRegistry\SignalRegistry


// Implemented in Symfony\Component\Console\Application

public function getVersion(): string;
Gets the application version.

Parameters: not specified

Return value: string


// Implemented in Symfony\Component\Console\Application

public function has(string $name): bool;
Returns true if the command exists, false otherwise.

Parameters:

Name Type Description
$name string -

Return value: bool


// Implemented in Symfony\Component\Console\Application

public function isAutoExitEnabled(): bool;
Gets whether to automatically exit after a command execution or not.

Parameters: not specified

Return value: bool


// Implemented in Symfony\Component\Console\Application

public function isSingleCommand(): bool;

Parameters: not specified

Return value: bool


// Implemented in Symfony\Component\Console\Application

public function register(string $name): \Symfony\Component\Console\Command\Command;
Registers a new command.

Parameters:

Name Type Description
$name string -

Return value: \Symfony\Component\Console\Command\Command


// Implemented in Symfony\Component\Console\Application

public function renderThrowable(\Throwable $e, \Symfony\Component\Console\Output\OutputInterface $output): void;

Parameters:

Name Type Description
$e \Throwable -
$output \Symfony\Component\Console\Output\OutputInterface -

Return value: void


// Implemented in Symfony\Component\Console\Application

public function reset(): mixed;

Parameters: not specified

Return value: mixed


// Implemented in Symfony\Component\Console\Application

public function run(\Symfony\Component\Console\Input\InputInterface $input = null, \Symfony\Component\Console\Output\OutputInterface $output = null): int;
Runs the current application.

Parameters:

Name Type Description
$input \Symfony\Component\Console\Input\InputInterface -
$output \Symfony\Component\Console\Output\OutputInterface -

Return value: int

Throws:

  • \Exception - When running fails. Bypass this when {@link setCatchExceptions()}.

// Implemented in Symfony\Component\Console\Application

public function setAutoExit(bool $boolean): mixed;
Sets whether to automatically exit after a command execution or not.

Parameters:

Name Type Description
$boolean bool -

Return value: mixed


// Implemented in Symfony\Component\Console\Application

public function setCatchExceptions(bool $boolean): mixed;
Sets whether to catch exceptions or not during commands execution.

Parameters:

Name Type Description
$boolean bool -

Return value: mixed


// Implemented in Symfony\Component\Console\Application

public function setCommandLoader(\Symfony\Component\Console\CommandLoader\CommandLoaderInterface $commandLoader): mixed;

Parameters:

Name Type Description
$commandLoader \Symfony\Component\Console\CommandLoader\CommandLoaderInterface -

Return value: mixed


// Implemented in Symfony\Component\Console\Application

public function setDefaultCommand(string $commandName, bool $isSingleCommand = false): static;
Sets the default Command name.

Parameters:

Name Type Description
$commandName string -
$isSingleCommand bool -

Return value: static


// Implemented in Symfony\Component\Console\Application

public function setDefinition(\Symfony\Component\Console\Input\InputDefinition $definition): mixed;

Parameters:

Name Type Description
$definition \Symfony\Component\Console\Input\InputDefinition -

Return value: mixed


// Implemented in Symfony\Component\Console\Application

public function setDispatcher(\Symfony\Contracts\EventDispatcher\EventDispatcherInterface $dispatcher): mixed;

Parameters:

Name Type Description
$dispatcher \Symfony\Contracts\EventDispatcher\EventDispatcherInterface -

Return value: mixed


// Implemented in Symfony\Component\Console\Application

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\Application

public function setName(string $name): mixed;
Sets the application name.

Parameters:

Name Type Description
$name string -

Return value: mixed


// Implemented in Symfony\Component\Console\Application

public function setSignalsToDispatchEvent(int ...$signalsToDispatchEvent): mixed;

Parameters:

Name Type Description
$signalsToDispatchEvent (variadic) int -

Return value: mixed


// Implemented in Symfony\Component\Console\Application

public function setVersion(string $version): mixed;
Sets the application version.

Parameters:

Name Type Description
$version string -

Return value: mixed