class Application extends Container implements Application, HttpKernelInterface (View source)
VERSION | The Laravel framework version. |
array | $contextual | The contextual binding map. | from Container |
ContextualBindingBuilder | when( string $concrete) Define a contextual binding. | from Container |
bool | bound( string $abstract) Determine if the given abstract type has been bound. | |
bool | resolved( string $abstract) Determine if the given abstract type has been resolved. | from Container |
bool | isAlias( string $name) Determine if a given string is an alias. | from Container |
void | bind( string|array $abstract, Closure|string|null $concrete = null, bool $shared = false) Register a binding with the container. | from Container |
void | addContextualBinding( string $concrete, string $abstract, Closure|string $implementation) Add a contextual binding to the container. | from Container |
void | bindIf( string $abstract, Closure|string|null $concrete = null, bool $shared = false) Register a binding if it hasn't already been registered. | from Container |
void | singleton( string|array $abstract, Closure|string|null $concrete = null) Register a shared binding in the container. | from Container |
Closure | share( Closure $closure) Wrap a Closure such that it is shared. | from Container |
void | bindShared( string $abstract, Closure $closure) Bind a shared Closure into the container. | from Container |
void | extend( string $abstract, Closure $closure) "Extend" an abstract type in the container. | from Container |
void | instance( string $abstract, mixed $instance) Register an existing instance as shared in the container. | from Container |
void | tag( array|string $abstracts, array|mixed $tags) Assign a set of tags to a given binding. | from Container |
array | tagged( array $tag) Resolve all of the bindings for a given tag. | from Container |
void | alias( string $abstract, string $alias) Alias a type to a different name. | from Container |
mixed | rebinding( string $abstract, Closure $callback) Bind a new callback to an abstract's rebind event. | from Container |
mixed | refresh( string $abstract, mixed $target, string $method) Refresh an instance on the given target and method. | from Container |
Closure | wrap( Closure $callback, array $parameters = array()) Wrap the given closure such that its dependencies will be injected when executed. | from Container |
mixed | call( callable|string $callback, array $parameters = array(), string|null $defaultMethod = null) Call the given Closure / [email protected] and inject its dependencies. | from Container |
mixed | make( string $abstract, array $parameters = array()) Resolve the given type from the container. | |
mixed | build( string $concrete, array $parameters = array()) Instantiate a concrete instance of the given type. | from Container |
void | resolving( string $abstract, Closure $callback = null) Register a new resolving callback. | from Container |
void | afterResolving( string $abstract, Closure $callback = null) Register a new after resolving callback for all types. | from Container |
bool | isShared( string $abstract) Determine if a given type is shared. | from Container |
array | getBindings() Get the container's bindings. | from Container |
void | forgetInstance( string $abstract) Remove a resolved instance from the instance cache. | from Container |
void | forgetInstances() Clear all of the instances from the container. | from Container |
void | flush() Flush the container of all bindings and resolved instances. | |
static Container | getInstance() Set the globally available instance of the container. | from Container |
static void | setInstance( Container $container) Set the shared instance of the container. | from Container |
bool | offsetExists( string $key) Determine if a given offset exists. | from Container |
mixed | offsetGet( string $key) Get the value at a given offset. | from Container |
void | offsetSet( string $key, mixed $value) Set the value at a given offset. | from Container |
void | offsetUnset( string $key) Unset the value at a given offset. | from Container |
mixed | __get( string $key) Dynamically access container services. | from Container |
void | __set( string $key, mixed $value) Dynamically set container services. | from Container |
void | __construct( string|null $basePath = null) Create a new Illuminate application instance. | |
string | version() Get the version number of the application. | |
void | bootstrapWith( array $bootstrappers) Run the given array of bootstrap classes. | |
void | afterLoadingEnvironment( Closure $callback) Register a callback to run after loading the environment. | |
void | beforeBootstrapping( string $bootstrapper, Closure $callback) Register a callback to run before a bootstrapper. | |
void | afterBootstrapping( string $bootstrapper, Closure $callback) Register a callback to run after a bootstrapper. | |
bool | hasBeenBootstrapped() Determine if the application has been bootstrapped before. | |
$this | setBasePath( string $basePath) Set the base path for the application. | |
string | path() Get the path to the application "app" directory. | |
string | basePath() Get the base path of the Laravel installation. | |
string | configPath() Get the path to the application configuration files. | |
string | databasePath() Get the path to the database directory. | |
$this | useDatabasePath( string $path) Set the database directory. | |
string | langPath() Get the path to the language files. | |
string | publicPath() Get the path to the public / web directory. | |
string | storagePath() Get the path to the storage directory. | |
$this | useStoragePath( string $path) Set the storage directory. | |
string | environmentPath() Get the path to the environment file directory. | |
$this | useEnvironmentPath( string $path) Set the directory for the environment file. | |
$this | loadEnvironmentFrom( string $file) Set the environment file to be loaded during bootstrapping. | |
string | environmentFile() Get the environment file the application is using. | |
string | environment() Get or check the current application environment. | |
bool | isLocal() Determine if application is in local environment. | |
string | detectEnvironment( Closure $callback) Detect the application's current environment. | |
bool | runningInConsole() Determine if we are running in the console. | |
bool | runningUnitTests() Determine if we are running unit tests. | |
void | registerConfiguredProviders() Register all of the configured providers. | |
ServiceProvider | register( ServiceProvider|string $provider, array $options = array(), bool $force = false) Register a service provider with the application. | |
ServiceProvider|null | getProvider( ServiceProvider|string $provider) Get the registered service provider instance if it exists. | |
ServiceProvider | resolveProviderClass( string $provider) Resolve a service provider instance from the class name. | |
void | loadDeferredProviders() Load and boot all of the remaining deferred providers. | |
void | loadDeferredProvider( string $service) Load the provider for a deferred service. | |
void | registerDeferredProvider( string $provider, string $service = null) Register a deferred provider and service. | |
bool | isBooted() Determine if the application has booted. | |
void | boot() Boot the application's service providers. | |
void | booting( mixed $callback) Register a new boot listener. | |
void | booted( mixed $callback) Register a new "booted" listener. | |
handle( Request $request, $type = self::MASTER_REQUEST, $catch = true) | ||
bool | shouldSkipMiddleware() Determine if middleware has been disabled for the application. | |
bool | configurationIsCached() Determine if the application configuration is cached. | |
string | getCachedConfigPath() Get the path to the configuration cache file. | |
bool | routesAreCached() Determine if the application routes are cached. | |
string | getCachedRoutesPath() Get the path to the routes cache file. | |
string | getCachedCompilePath() Get the path to the cached "compiled.php" file. | |
string | getCachedServicesPath() Get the path to the cached services.json file. | |
bool | isDownForMaintenance() Determine if the application is currently down for maintenance. | |
void | abort( int $code, string $message = '', array $headers = array()) Throw an HttpException with the given data. | |
$this | terminating( Closure $callback) Register a terminating callback with the application. | |
void | terminate() Terminate the application. | |
array | getLoadedProviders() Get the service providers that have been loaded. | |
array | getDeferredServices() Get the application's deferred services. | |
void | setDeferredServices( array $services) Set the application's deferred services. | |
void | addDeferredServices( array $services) Add an array of services to the application's deferred services. | |
bool | isDeferredService( string $service) Determine if the given service is a deferred service. | |
$this | configureMonologUsing( callable $callback) Define a callback to be used to configure Monolog. | |
bool | hasMonologConfigurator() Determine if the application has a custom Monolog configurator. | |
callable | getMonologConfigurator() Get the custom Monolog configurator for the application. | |
string | getLocale() Get the current application locale. | |
void | setLocale( string $locale) Set the current application locale. | |
void | registerCoreContainerAliases() Register the core class aliases in the container. | |
string | getNamespace() Get the application namespace. |
Define a contextual binding.
Determine if the given abstract type has been bound.
(Overriding Container::bound)
Determine if the given abstract type has been resolved.
Determine if a given string is an alias.
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.
Bind a shared Closure into the container.
"Extend" an abstract type in the container.
Register an existing instance as shared in the container.
Assign a set of tags to a given binding.
Resolve all of the bindings for a given tag.
Alias a type to a different name.
Bind a new callback to an abstract's rebind event.
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 / [email protected] and inject its dependencies.
Resolve the given type from the container.
(Overriding Container::make)
Instantiate a concrete instance of the given type.
Register a new resolving callback.
Register a new after resolving callback for all types.
Determine if a given type is shared.
Get the container's bindings.
Remove a resolved instance from the instance cache.
Clear all of the instances from the container.
Flush the container of all bindings and resolved instances.
Set the globally available instance of the container.
Set the shared instance of the container.
Determine if a given offset exists.
Get the value at a given offset.
Set the value at a given offset.
Unset the value at a given offset.
Dynamically access container services.
Dynamically set container services.
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 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 or check the current application environment.
Determine if application is in local environment.
Detect the application's current 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.
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.json file.
Determine if the application is currently down for maintenance.
Throw an HttpException with the given data.
Register a terminating callback with the application.
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.
Register the core class aliases in the container.
Get the application namespace.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.1/Illuminate/Foundation/Application.html