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

LoggerAwareTrait
ConfigAwareTrait

Properties

protected BootstrapManager $bootstrapManager
protected SiteAliasManager $aliasManager
protected RedispatchHook $redispatchHook
protected TildeExpansionHook $tildeExpansionHook

Methods

getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

configureGlobalOptions()

Add global options to the Application and their default values to Config.

bootstrapManager()

No description

setBootstrapManager(BootstrapManager $bootstrapManager)

No description

aliasManager()

No description

setAliasManager($aliasManager)

No description

setRedispatchHook(RedispatchHook $redispatchHook)

No description

setTildeExpansionHook(TildeExpansionHook $tildeExpansionHook)

No description

getUri()

Return the framework uri selected by the user.

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.

find($name)

No description

bootstrapAndFind($name)

Look up a command. Bootstrap further if necessary.

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.

configureIO(InputInterface $input, OutputInterface $output)

No description

configureAndRegisterCommands(InputInterface $input, OutputInterface $output, $commandfileSearchpath)

Configure the application object and register all of the commandfiles available in the search paths provided via Preflight

commandsFromConfiguration()

No description

loadCommandClasses($commandClasses)

Ensure that any discovered class that is not part of the autoloader is, in fact, included.

commandDiscovery()

Create a command file discovery object

Details

DrushConfig getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

configureGlobalOptions()

Add global options to the Application and their default values to Config.

bootstrapManager()

setBootstrapManager(BootstrapManager $bootstrapManager)

Parameters

BootstrapManager $bootstrapManager

aliasManager()

setAliasManager($aliasManager)

Parameters

$aliasManager

setRedispatchHook(RedispatchHook $redispatchHook)

Parameters

RedispatchHook $redispatchHook

setTildeExpansionHook(TildeExpansionHook $tildeExpansionHook)

Parameters

TildeExpansionHook $tildeExpansionHook

getUri()

Return the framework uri selected by the user.

refineUriSelection($cwd)

If the user did not explicitly select a site URI, then pick an appropriate site from the cwd.

Parameters

$cwd

selectUri($cwd)

Select a URI to use for the site, based on directory or config.

Parameters

$cwd

find($name)

Parameters

$name

protected bootstrapAndFind($name)

Look up a command. Bootstrap further if necessary.

Parameters

$name

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.

Parameters

$command

protected configureIO(InputInterface $input, OutputInterface $output)

Parameters

InputInterface $input
OutputInterface $output

configureAndRegisterCommands(InputInterface $input, OutputInterface $output, $commandfileSearchpath)

Configure the application object and register all of the commandfiles available in the search paths provided via Preflight

Parameters

InputInterface $input
OutputInterface $output
$commandfileSearchpath

protected commandsFromConfiguration()

protected loadCommandClasses($commandClasses)

Ensure that any discovered class that is not part of the autoloader is, in fact, included.

Parameters

$commandClasses

protected commandDiscovery()

Create a command file discovery object