‪TYPO3CMS  10.4
TYPO3\CMS\Core\Console\CommandApplication Class Reference
Inheritance diagram for TYPO3\CMS\Core\Console\CommandApplication:
TYPO3\CMS\Core\Core\ApplicationInterface

Public Member Functions

 __construct (Context $context, CommandRegistry $commandRegistry)
 
 run (callable $execute=null)
 

Protected Member Functions

 checkEnvironmentOrDie ()
 
 initializeContext ()
 
 populateAvailableCommands ()
 

Protected Attributes

Context $context
 
CommandRegistry $commandRegistry
 
Application $application
 

Detailed Description

Entry point for the TYPO3 Command Line for Commands In addition to a simple Symfony Command, this also sets up a CLI user

Definition at line 38 of file CommandApplication.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ checkEnvironmentOrDie()

TYPO3\CMS\Core\Console\CommandApplication::checkEnvironmentOrDie ( )
protected

Check the script is called from a cli environment.

Definition at line 100 of file CommandApplication.php.

Referenced by TYPO3\CMS\Core\Console\CommandApplication\__construct().

◆ initializeContext()

TYPO3\CMS\Core\Console\CommandApplication::initializeContext ( )
protected

Initializes the Context used for accessing data and finding out the current state of the application

Definition at line 110 of file CommandApplication.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\Console\CommandApplication\run().

◆ populateAvailableCommands()

TYPO3\CMS\Core\Console\CommandApplication::populateAvailableCommands ( )
protected

Put all available commands inside the application

Note: This method will be removed in TYPO3 v11 when support for Configuration/Commands.php is dropped.

Definition at line 123 of file CommandApplication.php.

Referenced by TYPO3\CMS\Core\Console\CommandApplication\run().

◆ run()

Member Data Documentation

◆ $application

Application TYPO3\CMS\Core\Console\CommandApplication::$application
protected

Instance of the symfony application

Definition at line 51 of file CommandApplication.php.

◆ $commandRegistry

CommandRegistry TYPO3\CMS\Core\Console\CommandApplication::$commandRegistry
protected

◆ $context

Context TYPO3\CMS\Core\Console\CommandApplication::$context
protected