Application
class Application extends Application implements LoggerAwareInterface, ConfigAwareInterface (View source)
Our application object
Note: Implementing *AwareInterface here does NOT automatically cause that corresponding service to be injected into the Application. This is because the application object is created prior to the DI container. See DependencyInjection::injectApplicationServices() to add more services.
Traits
Properties
| protected BootstrapManager|null | $bootstrapManager | ||
| protected SiteAliasManager|null | $aliasManager | ||
| protected RedispatchHook|null | $redispatchHook | ||
| protected TildeExpansionHook|null | $tildeExpansionHook | ||
| protected ServiceManager|null | $serviceManager |
Methods
Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.
Add global options to the Application and their default values to Config.
No description
No description
Return the framework uri selected by the user.
If the user did not explicitly select a site URI, then pick an appropriate site from the cwd.
Select a URI to use for the site, based on directory or config.
No description
No description
Look up a command. Bootstrap further if necessary.
If a command is annotated @obsolete, then we will throw an exception immediately; the command will not run, and no hooks will be called.
No description
Configure the application object and register all of the commandfiles available in the search paths provided via Preflight
Renders a caught Throwable. Omits the command docs at end.
Register command handler instances with the application.
No description
No description
Details
DrushConfig
getConfig()
Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.
void
configureGlobalOptions()
Add global options to the Application and their default values to Config.
BootstrapManager|null
bootstrapManager()
No description
void
setBootstrapManager(BootstrapManager $bootstrapManager)
No description
SiteAliasManager|null
aliasManager()
No description
void
setAliasManager(SiteAliasManager|null $aliasManager)
No description
void
setRedispatchHook(RedispatchHook $redispatchHook)
No description
void
setTildeExpansionHook(TildeExpansionHook $tildeExpansionHook)
No description
void
setServiceManager(ServiceManager $serviceManager)
No description
string|false
getUri()
Return the framework uri selected by the user.
void
refineUriSelection($cwd)
If the user did not explicitly select a site URI, then pick an appropriate site from the cwd.
selectUri($cwd)
Select a URI to use for the site, based on directory or config.
Command
find($name)
No description
protected int
doRunCommand(Command $command, InputInterface $input, OutputInterface $output)
No description
protected Command|RemoteCommandProxy
bootstrapAndFind(string $name)
Look up a command. Bootstrap further if necessary.
protected
checkObsolete($command)
If a command is annotated @obsolete, then we will throw an exception immediately; the command will not run, and no hooks will be called.
protected void
configureIO(InputInterface $input, OutputInterface $output)
No description
void
configureAndRegisterCommands(InputInterface $input, OutputInterface $output, $commandfileSearchpath, ClassLoader $classLoader)
Configure the application object and register all of the commandfiles available in the search paths provided via Preflight
void
renderThrowable(Throwable $e, OutputInterface $output)
Renders a caught Throwable. Omits the command docs at end.
void
registerCommandInstances(object|array $handlers)
Register command handler instances with the application.
For Symfony Command objects, adds them directly. For annotated command handler objects, creates commands via commandFactory.
protected void
addListeners($commandfileSearchpath)
No description
protected void
redispatchIfRemote(Command $command, InputInterface $input)
No description