class Application extends Container (View source)

Properties

protected $installed
protected $environment
protected $packages

Methods

shutdown(array $options = [])

Turns off the lights.

dispatch(Request $request) deprecated

No description

clearCaches()

Utility method for clearing all application caches.

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 concrete5 is installed, false if it has not yet been.

checkPageCache(Request $request)

Checks to see whether we should deliver a concrete5 response from the page cache.

handleAutomaticUpdates()

No description

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.

handleURLSlashes(Request $request, Site $site)

Using the configuration value, determines whether we need to redirect to a URL with a trailing slash or not.

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, array $parameters = [])

Instantiate a concrete instance of the given type.

getRuntime()

No description

string[]
getRegisteredAliases()

Get the list of registered aliases.

bindShared($abstract, $concrete) deprecated

No description

Details

shutdown(array $options = [])

Turns off the lights.

Parameters

array $options Array of options for disabling certain things during shutdown Add 'jobs' => true to disable scheduled jobs Add 'log_queries' => true to disable query logging

dispatch(Request $request) deprecated

deprecated Use the dispatcher object to dispatch

Parameters

Request $request

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 concrete5 is installed, false if it has not yet been.

checkPageCache(Request $request)

Checks to see whether we should deliver a concrete5 response from the page cache.

Parameters

Request $request

handleAutomaticUpdates()

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.

Parameters

Request $request
Site $site

Return Value

RedirectResponse

RedirectResponse|null handleCanonicalURLRedirection(Request $r, Site $site)

If we have redirect to canonical host enabled, we need to honor it here.

Parameters

Request $r
Site $site

Return Value

RedirectResponse|null

string|bool environment()

Get or check the current application environment.

Return Value

string|bool

string detectEnvironment(array|string|callable $environments)

Detect the application's current environment.

Parameters

array|string|callable $environments

Return Value

string

mixed build(string $concrete, array $parameters = [])

Instantiate a concrete instance of the given type.

Parameters

string $concrete
array $parameters

Return Value

mixed

Exceptions

BindingResolutionException

RuntimeInterface getRuntime()

Return Value

RuntimeInterface

string[] getRegisteredAliases()

Get the list of registered aliases.

Return Value

string[]

bindShared($abstract, $concrete) deprecated

deprecated Use the singleton method

Parameters

$abstract
$concrete