‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Console\CommandRegistry Class Reference
Inheritance diagram for TYPO3\CMS\Core\Console\CommandRegistry:

Public Member Functions

 __construct (ContainerInterface $container)
 has (string $name)
 get (string $name)
 getNames ()
 getSchedulableCommands ()
 getCommandByIdentifier (string $identifier)
 getNamespaces ()
array filter (string $namespace=null)
 addLazyCommand (string $commandName, string $serviceName, string $description=null, bool $hidden=false, bool $schedulable=false, string $aliasFor=null)

Protected Member Functions

 getInstance (string $service)

Protected Attributes

ContainerInterface $container
array[] $commandConfigurations = array( )
array[] $aliases = array( )

Private Member Functions

string extractNamespace (string $name, int $limit=null)

Detailed Description

Registry for Symfony commands, populated via dependency injection tags

Definition at line 30 of file CommandRegistry.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Console\CommandRegistry::__construct ( ContainerInterface  $container)

Member Function Documentation

◆ addLazyCommand()

TYPO3\CMS\Core\Console\CommandRegistry::addLazyCommand ( string  $commandName,
string  $serviceName,
string  $description = null,
bool  $hidden = false,
bool  $schedulable = false,
string  $aliasFor = null 

◆ extractNamespace()

string TYPO3\CMS\Core\Console\CommandRegistry::extractNamespace ( string  $name,
int  $limit = null 

Returns the namespace part of the command name.

This method is not part of public API and should not be used directly.

‪string The namespace of the command

Definition at line 201 of file CommandRegistry.php.

Referenced by TYPO3\CMS\Core\Console\CommandRegistry\addLazyCommand(), and TYPO3\CMS\Core\Console\CommandRegistry\filter().

◆ filter()

array TYPO3\CMS\Core\Console\CommandRegistry::filter ( string  $namespace = null)

Gets the commands (registered in the given namespace if provided).

The array keys are the full names and the values the command instances.

‪array An array of Command descriptors

Definition at line 147 of file CommandRegistry.php.

References TYPO3\CMS\Core\Console\CommandRegistry\extractNamespace().

◆ get()

TYPO3\CMS\Core\Console\CommandRegistry::get ( string  $name)

◆ getCommandByIdentifier()

TYPO3\CMS\Core\Console\CommandRegistry::getCommandByIdentifier ( string  $identifier)

◆ getInstance()

TYPO3\CMS\Core\Console\CommandRegistry::getInstance ( string  $service)

◆ getNames()

TYPO3\CMS\Core\Console\CommandRegistry::getNames ( )

◆ getNamespaces()

TYPO3\CMS\Core\Console\CommandRegistry::getNamespaces ( )

Definition at line 116 of file CommandRegistry.php.

◆ getSchedulableCommands()

TYPO3\CMS\Core\Console\CommandRegistry::getSchedulableCommands ( )

Get all commands which are allowed for scheduling recurring commands.

Definition at line 84 of file CommandRegistry.php.

References TYPO3\CMS\Core\Console\CommandRegistry\getInstance().

◆ has()

TYPO3\CMS\Core\Console\CommandRegistry::has ( string  $name)

Member Data Documentation

◆ $aliases

array [] TYPO3\CMS\Core\Console\CommandRegistry::$aliases = array( )

Map of command aliases

Definition at line 46 of file CommandRegistry.php.

◆ $commandConfigurations

array [] TYPO3\CMS\Core\Console\CommandRegistry::$commandConfigurations = array( )

Map of command configurations with the command name as key

Definition at line 40 of file CommandRegistry.php.

◆ $container

ContainerInterface TYPO3\CMS\Core\Console\CommandRegistry::$container