Application
Extends
Implements
- Application
- CachesConfiguration
- CachesRoutes
- Symfony\...\HttpKernelInterface
Uses
Constants
VERSION string
The Laravel framework version.
Properties
$basePath string
The base path for the Laravel installation.
$hasBeenBootstrapped bool
Indicates if the application has been bootstrapped before.
$booted bool
Indicates if the application has "booted".
$bootingCallbacks callable[]
The array of booting callbacks.
$bootedCallbacks callable[]
The array of booted callbacks.
$terminatingCallbacks callable[]
The array of terminating callbacks.
$serviceProviders Illuminate\...\ServiceProvider[]
All of the registered service providers.
$loadedProviders array
The names of the loaded service providers.
$deferredServices array
The deferred services and their providers.
$bootstrapPath string
The custom bootstrap path defined by the developer.
$appPath string
The custom application path defined by the developer.
$configPath string
The custom configuration path defined by the developer.
$databasePath string
The custom database path defined by the developer.
$langPath string
The custom language file path defined by the developer.
$publicPath string
The custom public / web path defined by the developer.
$storagePath string
The custom storage path defined by the developer.
$environmentPath string
The custom environment path defined by the developer.
$environmentFile string
The environment file to load during bootstrapping.
$isRunningInConsole bool|null
Indicates if the application is running in the console.
$namespace string
The application namespace.
$absoluteCachePathPrefixes string[]
The prefixes of absolute cache paths for use during normalization.
Methods
__construct ( $basePath ) : void
Create a new Illuminate application instance.
Parameters
- $basePath string|null
version ( ) : string
Get the version number of the application.
registerBaseBindings ( ) : void
Register the basic bindings into the container.
registerBaseServiceProviders ( ) : void
Register all of the base service providers.
bootstrapWith ( array $bootstrappers ) : void
Run the given array of bootstrap classes.
Parameters
- $bootstrappers string[]
afterLoadingEnvironment ( Closure $callback ) : void
Register a callback to run after loading the environment.
Parameters
- $callback Closure
beforeBootstrapping ( $bootstrapper , Closure $callback ) : void
Register a callback to run before a bootstrapper.
Parameters
- $bootstrapper string
- $callback Closure
afterBootstrapping ( $bootstrapper , Closure $callback ) : void
Register a callback to run after a bootstrapper.
Parameters
- $bootstrapper string
- $callback Closure
hasBeenBootstrapped ( ) : bool
Determine if the application has been bootstrapped before.
setBasePath ( $basePath ) : $this
Set the base path for the application.
Parameters
- $basePath string
bindPathsInContainer ( ) : void
Bind all of the application paths in the container.
path ( $path ) : string
Get the path to the application "app" directory.
Parameters
- $path string
useAppPath ( $path ) : $this
Set the application directory.
Parameters
- $path string
basePath ( $path ) : string
Get the base path of the Laravel installation.
Parameters
- $path string
bootstrapPath ( $path ) : string
Get the path to the bootstrap directory.
Parameters
- $path string
useBootstrapPath ( $path ) : $this
Set the bootstrap file directory.
Parameters
- $path string
configPath ( $path ) : string
Get the path to the application configuration files.
Parameters
- $path string
useConfigPath ( $path ) : $this
Set the configuration directory.
Parameters
- $path string
databasePath ( $path ) : string
Get the path to the database directory.
Parameters
- $path string
useDatabasePath ( $path ) : $this
Set the database directory.
Parameters
- $path string
langPath ( $path ) : string
Get the path to the language files.
Parameters
- $path string
useLangPath ( $path ) : $this
Set the language file directory.
Parameters
- $path string
publicPath ( $path ) : string
Get the path to the public / web directory.
Parameters
- $path string
usePublicPath ( $path ) : $this
Set the public / web directory.
Parameters
- $path string
storagePath ( $path ) : string
Get the path to the storage directory.
Parameters
- $path string
useStoragePath ( $path ) : $this
Set the storage directory.
Parameters
- $path string
resourcePath ( $path ) : string
Get the path to the resources directory.
Parameters
- $path string
viewPath ( $path ) : string
Get the path to the views directory.
Parameters
- $path string
joinPaths ( $basePath , $path ) : string
Join the given paths together.
Parameters
- $basePath string
- $path string
environmentPath ( ) : string
Get the path to the environment file directory.
useEnvironmentPath ( $path ) : $this
Set the directory for the environment file.
Parameters
- $path string
loadEnvironmentFrom ( $file ) : $this
Set the environment file to be loaded during bootstrapping.
Parameters
- $file string
environmentFile ( ) : string
Get the environment file the application is using.
environmentFilePath ( ) : string
Get the fully qualified path to the environment file.
environment ( $environments ) : string|bool
Get or check the current application environment.
Parameters
- $environments string|array
isLocal ( ) : bool
Determine if the application is in the local environment.
isProduction ( ) : bool
Determine if the application is in the production environment.
detectEnvironment ( Closure $callback ) : string
Detect the application's current environment.
Parameters
- $callback Closure
runningInConsole ( ) : bool
Determine if the application is running in the console.
runningUnitTests ( ) : bool
Determine if the application is running unit tests.
hasDebugModeEnabled ( ) : bool
Determine if the application is running with debug mode enabled.
registerConfiguredProviders ( ) : void
Register all of the configured providers.
register ( $provider , $force ) : ServiceProvider
Register a service provider with the application.
Parameters
- $provider ServiceProvider |string
- $force bool
getProvider ( $provider ) : ServiceProvider |null
Get the registered service provider instance if it exists.
Parameters
- $provider ServiceProvider |string
getProviders ( $provider ) : array
Get the registered service provider instances if any exist.
Parameters
- $provider ServiceProvider |string
resolveProvider ( $provider ) : ServiceProvider
Resolve a service provider instance from the class name.
Parameters
- $provider string
markAsRegistered ( $provider ) : void
Mark the given provider as registered.
Parameters
- $provider ServiceProvider
loadDeferredProviders ( ) : void
Load and boot all of the remaining deferred providers.
loadDeferredProvider ( $service ) : void
Load the provider for a deferred service.
Parameters
- $service string
registerDeferredProvider ( $provider , $service ) : void
Register a deferred provider and service.
Parameters
- $provider string
- $service string|null
make ( $abstract , array $parameters ) : mixed
Resolve the given type from the container.
Parameters
- $abstract string
- $parameters array
resolve ( $abstract , $parameters , $raiseEvents ) : mixed
Resolve the given type from the container.
Parameters
- $abstract string
- $parameters array
- $raiseEvents bool
loadDeferredProviderIfNeeded ( $abstract ) : void
Load the deferred provider if the given type is a deferred service and the instance has not been loaded.
Parameters
- $abstract string
bound ( $abstract ) : bool
Determine if the given abstract type has been bound.
Parameters
- $abstract string
isBooted ( ) : bool
Determine if the application has booted.
boot ( ) : void
Boot the application's service providers.
bootProvider ( ServiceProvider $provider ) : void
Boot the given service provider.
Parameters
- $provider ServiceProvider
booting ( $callback ) : void
Register a new boot listener.
Parameters
- $callback callable
booted ( $callback ) : void
Register a new "booted" listener.
Parameters
- $callback callable
fireAppCallbacks ( array $callbacks ) : void
Call the booting callbacks for the application.
Parameters
- $callbacks callable[]
handle ( Symfony\...\Request $request , int $type , bool $catch ) : Symfony\...\Response
{@inheritdoc}
shouldSkipMiddleware ( ) : bool
Determine if middleware has been disabled for the application.
getCachedServicesPath ( ) : string
Get the path to the cached services.php file.
getCachedPackagesPath ( ) : string
Get the path to the cached packages.php file.
configurationIsCached ( ) : bool
Determine if the application configuration is cached.
getCachedConfigPath ( ) : string
Get the path to the configuration cache file.
routesAreCached ( ) : bool
Determine if the application routes are cached.
getCachedRoutesPath ( ) : string
Get the path to the routes cache file.
eventsAreCached ( ) : bool
Determine if the application events are cached.
getCachedEventsPath ( ) : string
Get the path to the events cache file.
normalizeCachePath ( $key , $default ) : string
Normalize a relative or absolute path to a cache file.
Parameters
- $key string
- $default string
addAbsoluteCachePathPrefix ( $prefix ) : $this
Add new prefix to list of absolute path prefixes.
Parameters
- $prefix string
maintenanceMode ( ) : MaintenanceMode
Get an instance of the maintenance mode manager implementation.
isDownForMaintenance ( ) : bool
Determine if the application is currently down for maintenance.
abort ( $code , $message , array $headers ) : never
Throw an HttpException with the given data.
Parameters
- $code int
- $message string
- $headers array
terminating ( $callback ) : $this
Register a terminating callback with the application.
Parameters
- $callback callable|string
terminate ( ) : void
Terminate the application.
getLoadedProviders ( ) : array
Get the service providers that have been loaded.
providerIsLoaded ( string $provider ) : bool
Determine if the given service provider is loaded.
Parameters
- $provider string
getDeferredServices ( ) : array
Get the application's deferred services.
setDeferredServices ( array $services ) : void
Set the application's deferred services.
Parameters
- $services array
addDeferredServices ( array $services ) : void
Add an array of services to the application's deferred services.
Parameters
- $services array
isDeferredService ( $service ) : bool
Determine if the given service is a deferred service.
Parameters
- $service string
provideFacades ( $namespace ) : void
Configure the real-time facade namespace.
Parameters
- $namespace string
getLocale ( ) : string
Get the current application locale.
currentLocale ( ) : string
Get the current application locale.
getFallbackLocale ( ) : string
Get the current application fallback locale.
setLocale ( $locale ) : void
Set the current application locale.
Parameters
- $locale string
setFallbackLocale ( $fallbackLocale ) : void
Set the current application fallback locale.
Parameters
- $fallbackLocale string
isLocale ( $locale ) : bool
Determine if the application locale is the given locale.
Parameters
- $locale string
registerCoreContainerAliases ( ) : void
Register the core class aliases in the container.
flush ( ) : void
Flush the container of all bindings and resolved instances.
getNamespace ( ) : string
Get the application namespace.