Application
class Application extends Container implements Application, HttpKernelInterface (View source)
Constants
VERSION |
The Laravel framework version. |
Properties
array | $contextual | The contextual binding map. | from Container |
Methods
Determine if the given abstract type has been bound.
Determine if the given abstract type has been resolved.
Register a binding with the container.
Add a contextual binding to the container.
Register a binding if it hasn't already been registered.
Register a shared binding in the container.
Register an existing instance as shared in the container.
Assign a set of tags to a given binding.
Refresh an instance on the given target and method.
Wrap the given closure such that its dependencies will be injected when executed.
Call the given Closure / class@method and inject its dependencies.
Resolve the given type from the container.
Instantiate a concrete instance of the given type.
Register a new after resolving callback for all types.
Remove a resolved instance from the instance cache.
Flush the container of all bindings and resolved instances.
Create a new Illuminate application instance.
Get the version number of the application.
Run the given array of bootstrap classes.
Register a callback to run after loading the environment.
Register a callback to run before a bootstrapper.
Register a callback to run after a bootstrapper.
Determine if the application has been bootstrapped before.
Set the base path for the application.
Get the path to the application "app" directory.
Get the base path of the Laravel installation.
Get the path to the bootstrap directory.
Get the path to the application configuration files.
Get the path to the database directory.
Set the database directory.
Get the path to the language files.
Get the path to the public / web directory.
Get the path to the storage directory.
Set the storage directory.
Get the path to the environment file directory.
Set the directory for the environment file.
Set the environment file to be loaded during bootstrapping.
Get the environment file the application is using.
Get the fully qualified path to the environment file.
Get or check the current application environment.
Determine if application is in local environment.
Determine if we are running in the console.
Determine if we are running unit tests.
Register all of the configured providers.
Register a service provider with the application.
Get the registered service provider instance if it exists.
Resolve a service provider instance from the class name.
Load and boot all of the remaining deferred providers.
Load the provider for a deferred service.
Register a deferred provider and service.
Determine if the application has booted.
Boot the application's service providers.
Register a new boot listener.
Register a new "booted" listener.
{@inheritdoc}
Determine if middleware has been disabled for the application.
Determine if the application configuration is cached.
Get the path to the configuration cache file.
Determine if the application routes are cached.
Get the path to the routes cache file.
Get the path to the cached "compiled.php" file.
Get the path to the cached services.php file.
Determine if the application is currently down for maintenance.
Throw an HttpException with the given data.
Terminate the application.
Get the service providers that have been loaded.
Get the application's deferred services.
Set the application's deferred services.
Add an array of services to the application's deferred services.
Determine if the given service is a deferred service.
Define a callback to be used to configure Monolog.
Determine if the application has a custom Monolog configurator.
Get the custom Monolog configurator for the application.
Get the current application locale.
Set the current application locale.
Determine if application locale is the given locale.
Register the core class aliases in the container.
Get the application namespace.
Details
at line line 708
bool
bound(
string $abstract)
Determine if the given abstract type has been bound.
(Overriding Container::bound)
void
bind(
string|array $abstract,
Closure|string|null $concrete = null,
bool $shared = false)
Register a binding with the container.
void
addContextualBinding(
string $concrete,
string $abstract,
Closure|string $implementation)
Add a contextual binding to the container.
void
bindIf(
string $abstract,
Closure|string|null $concrete = null,
bool $shared = false)
Register a binding if it hasn't already been registered.
void
singleton(
string|array $abstract,
Closure|string|null $concrete = null)
Register a shared binding in the container.
void
instance(
string $abstract,
mixed $instance)
Register an existing instance as shared in the container.
mixed
rebinding(
string $abstract,
Closure $callback)
Bind a new callback to an abstract's rebind event.
mixed
refresh(
string $abstract,
mixed $target,
string $method)
Refresh an instance on the given target and method.
Closure
wrap(
Closure $callback,
array $parameters = array())
Wrap the given closure such that its dependencies will be injected when executed.
mixed
call(
callable|string $callback,
array $parameters = array(),
string|null $defaultMethod = null)
Call the given Closure / class@method and inject its dependencies.
at line line 689
mixed
make(
string $abstract,
array $parameters = array())
Resolve the given type from the container.
(Overriding Container::make)
mixed
build(
string $concrete,
array $parameters = array())
Instantiate a concrete instance of the given type.
void
afterResolving(
string $abstract,
Closure $callback = null)
Register a new after resolving callback for all types.
at line line 141
void
__construct(
string|null $basePath = null)
Create a new Illuminate application instance.
at line line 196
void
bootstrapWith(
array $bootstrappers)
Run the given array of bootstrap classes.
at line line 215
void
afterLoadingEnvironment(
Closure $callback)
Register a callback to run after loading the environment.
at line line 229
void
beforeBootstrapping(
string $bootstrapper,
Closure $callback)
Register a callback to run before a bootstrapper.
at line line 241
void
afterBootstrapping(
string $bootstrapper,
Closure $callback)
Register a callback to run after a bootstrapper.
at line line 251
bool
hasBeenBootstrapped()
Determine if the application has been bootstrapped before.
at line line 414
$this
useEnvironmentPath(
string $path)
Set the directory for the environment file.
at line line 427
$this
loadEnvironmentFrom(
string $file)
Set the environment file to be loaded during bootstrapping.
at line line 493
string
detectEnvironment(
Closure $callback)
Detect the application's current environment.
at line line 541
ServiceProvider
register(
ServiceProvider|string $provider,
array $options = array(),
bool $force = false)
Register a service provider with the application.
at line line 581
ServiceProvider|null
getProvider(
ServiceProvider|string $provider)
Get the registered service provider instance if it exists.
at line line 596
ServiceProvider
resolveProviderClass(
string $provider)
Resolve a service provider instance from the class name.
at line line 621
void
loadDeferredProviders()
Load and boot all of the remaining deferred providers.
at line line 639
void
loadDeferredProvider(
string $service)
Load the provider for a deferred service.
at line line 662
void
registerDeferredProvider(
string $provider,
string $service = null)
Register a deferred provider and service.
at line line 803
handle(
Request $request, $type = self::MASTER_REQUEST, $catch = true)
{@inheritdoc}
at line line 813
bool
shouldSkipMiddleware()
Determine if middleware has been disabled for the application.
at line line 884
bool
isDownForMaintenance()
Determine if the application is currently down for maintenance.
at line line 899
void
abort(
int $code,
string $message = '',
array $headers = array())
Throw an HttpException with the given data.
at line line 914
$this
terminating(
Closure $callback)
Register a terminating callback with the application.
at line line 959
void
setDeferredServices(
array $services)
Set the application's deferred services.
at line line 970
void
addDeferredServices(
array $services)
Add an array of services to the application's deferred services.
at line line 981
bool
isDeferredService(
string $service)
Determine if the given service is a deferred service.
at line line 992
$this
configureMonologUsing(
callable $callback)
Define a callback to be used to configure Monolog.
at line line 1004
bool
hasMonologConfigurator()
Determine if the application has a custom Monolog configurator.
at line line 1014
callable
getMonologConfigurator()
Get the custom Monolog configurator for the application.
at line line 1050
bool
isLocale(
string $locale)
Determine if application locale is the given locale.
at line line 1060
void
registerCoreContainerAliases()
Register the core class aliases in the container.