Application
class Application extends Container (View source)
Properties
protected | $installed | ||
protected | $environment | ||
protected | $packages |
Methods
Dispatches a command/message on the message bus. If the command is executed immediately, the result is returned.
Turns off the lights.
Utility method for clearing all application caches.
If we have job scheduling running through the site, we check to see if it's time to go for it.
Returns true if Concrete is installed, false if it has not yet been.
Checks to see whether we should deliver a Concrete response from the page cache.
Check if the core needs to be updated, and if so, updates it.
Register package autoloaders. Has to come BEFORE session calls.
Run startup and localization events on any installed packages.
Ensure we have a cache directory.
Returns true if the app is run through the command line.
Using the configuration value, determines whether we need to redirect to a URL with a trailing slash or not.
If we have redirect to canonical host enabled, we need to honor it here.
Get or check the current application environment.
Detect the application's current environment.
Instantiate a concrete instance of the given type.
No description
Get the list of registered aliases.
Get the list of registered instances.
Details
mixed
executeCommand(object $command, string $onBus = 'default')
Dispatches a command/message on the message bus. If the command is executed immediately, the result is returned.
This is a convenience method for mostly synchronous commands, and it uses the command bus.
shutdown(array $options = [])
Turns off the lights.
dispatch(Request $request)
deprecated
deprecated
No description
clearCaches()
Utility method for clearing all application caches.
protected
handleScheduledJobs()
If we have job scheduling running through the site, we check to see if it's time to go for it.
isInstalled()
Returns true if Concrete is installed, false if it has not yet been.
checkPageCache(Request $request)
Checks to see whether we should deliver a Concrete response from the page cache.
handleAutomaticUpdates()
Check if the core needs to be updated, and if so, updates it.
setupPackageAutoloaders()
Register package autoloaders. Has to come BEFORE session calls.
setupPackages()
Run startup and localization events on any installed packages.
setupFilesystem()
Ensure we have a cache directory.
static
isRunThroughCommandLineInterface()
Returns true if the app is run through the command line.
RedirectResponse
handleURLSlashes(Request $request, Site $site)
Using the configuration value, determines whether we need to redirect to a URL with a trailing slash or not.
RedirectResponse|null
handleCanonicalURLRedirection(Request $r, Site $site)
If we have redirect to canonical host enabled, we need to honor it here.
string|bool
environment()
Get or check the current application environment.
string
detectEnvironment(array|string|callable $environments)
Detect the application's current environment.
mixed
build(string $concrete)
Instantiate a concrete instance of the given type.
RuntimeInterface
getRuntime()
No description
string[]
getRegisteredAliases()
Get the list of registered aliases.
string[]
getRegisteredInstances()
Get the list of registered instances.
bindShared($abstract, $concrete)
deprecated
deprecated
No description