Documentation

Application extends Container
in package
implements Application, HttpKernelInterface

Interfaces, Classes and Traits

Application
Describes the interface of a container that exposes methods to read its entries.
HttpKernelInterface
HttpKernelInterface handles a Request to convert it to a Response.

Table of Contents

VERSION  = '5.5.50'
The Laravel framework version.
$contextual  : array<string|int, mixed>
The contextual binding map.
$abstractAliases  : array<string|int, mixed>
The registered aliases keyed by the abstract name.
$afterResolvingCallbacks  : array<string|int, mixed>
All of the after resolving callbacks by class type.
$aliases  : array<string|int, mixed>
The registered type aliases.
$basePath  : string
The base path for the Laravel installation.
$bindings  : array<string|int, mixed>
The container's bindings.
$booted  : bool
Indicates if the application has "booted".
$bootedCallbacks  : array<string|int, mixed>
The array of booted callbacks.
$bootingCallbacks  : array<string|int, mixed>
The array of booting callbacks.
$buildStack  : array<string|int, mixed>
The stack of concretions currently being built.
$databasePath  : string
The custom database path defined by the developer.
$deferredServices  : array<string|int, mixed>
The deferred services and their providers.
$environmentFile  : string
The environment file to load during bootstrapping.
$environmentPath  : string
The custom environment path defined by the developer.
$extenders  : array<string|int, mixed>
The extension closures for services.
$globalAfterResolvingCallbacks  : array<string|int, mixed>
All of the global after resolving callbacks.
$globalResolvingCallbacks  : array<string|int, mixed>
All of the global resolving callbacks.
$hasBeenBootstrapped  : bool
Indicates if the application has been bootstrapped before.
$instance  : static
The current globally available container (if any).
$instances  : array<string|int, mixed>
The container's shared instances.
$loadedProviders  : array<string|int, mixed>
The names of the loaded service providers.
$methodBindings  : array<string|int, mixed>
The container's method bindings.
$monologConfigurator  : callable|null
A custom callback used to configure Monolog.
$namespace  : string
The application namespace.
$reboundCallbacks  : array<string|int, mixed>
All of the registered rebound callbacks.
$resolved  : array<string|int, mixed>
An array of the types that have been resolved.
$resolvingCallbacks  : array<string|int, mixed>
All of the resolving callbacks by class type.
$serviceProviders  : array<string|int, mixed>
All of the registered service providers.
$storagePath  : string
The custom storage path defined by the developer.
$tags  : array<string|int, mixed>
All of the registered tags.
$terminatingCallbacks  : array<string|int, mixed>
The array of terminating callbacks.
$with  : array<string|int, mixed>
The parameter override stack.
__construct()  : void
Create a new Illuminate application instance.
__get()  : mixed
Dynamically access container services.
__set()  : void
Dynamically set container services.
abort()  : void
Throw an HttpException with the given data.
addContextualBinding()  : void
Add a contextual binding to the container.
addDeferredServices()  : void
Add an array of services to the application's deferred services.
afterBootstrapping()  : void
Register a callback to run after a bootstrapper.
afterLoadingEnvironment()  : void
Register a callback to run after loading the environment.
afterResolving()  : void
Register a new after resolving callback for all types.
alias()  : void
Alias a type to a different name.
basePath()  : string
Get the base path of the Laravel installation.
beforeBootstrapping()  : void
Register a callback to run before a bootstrapper.
bind()  : void
Register a binding with the container.
bindIf()  : void
Register a binding if it hasn't already been registered.
bindMethod()  : void
Bind a callback to resolve with Container::call.
boot()  : void
Boot the application's service providers.
booted()  : void
Register a new "booted" listener.
booting()  : void
Register a new boot listener.
bootstrapPath()  : string
Get the path to the bootstrap directory.
bootstrapWith()  : void
Run the given array of bootstrap classes.
bound()  : bool
Determine if the given abstract type has been bound.
build()  : mixed
Instantiate a concrete instance of the given type.
call()  : mixed
Call the given Closure / class@method and inject its dependencies.
callMethodBinding()  : mixed
Get the method binding for the given method.
configPath()  : string
Get the path to the application configuration files.
configurationIsCached()  : bool
Determine if the application configuration is cached.
configureMonologUsing()  : $this
Define a callback to be used to configure Monolog.
databasePath()  : string
Get the path to the database directory.
detectEnvironment()  : string
Detect the application's current environment.
environment()  : string|bool
Get or check the current application environment.
environmentFile()  : string
Get the environment file the application is using.
environmentFilePath()  : string
Get the fully qualified path to the environment file.
environmentPath()  : string
Get the path to the environment file directory.
extend()  : void
"Extend" an abstract type in the container.
factory()  : Closure
Get a closure to resolve the given type from the container.
flush()  : void
Flush the container of all bindings and resolved instances.
forgetExtenders()  : void
Remove all of the extender callbacks for a given type.
forgetInstance()  : void
Remove a resolved instance from the instance cache.
forgetInstances()  : void
Clear all of the instances from the container.
get()  : mixed
{@inheritdoc}
getAlias()  : string
Get the alias for an abstract if available.
getBindings()  : array<string|int, mixed>
Get the container's bindings.
getCachedConfigPath()  : string
Get the path to the configuration cache file.
getCachedPackagesPath()  : string
Get the path to the cached packages.php file.
getCachedRoutesPath()  : string
Get the path to the routes cache file.
getCachedServicesPath()  : string
Get the path to the cached services.php file.
getDeferredServices()  : array<string|int, mixed>
Get the application's deferred services.
getInstance()  : static
Set the globally available instance of the container.
getLoadedProviders()  : array<string|int, mixed>
Get the service providers that have been loaded.
getLocale()  : string
Get the current application locale.
getMonologConfigurator()  : callable
Get the custom Monolog configurator for the application.
getNamespace()  : string
Get the application namespace.
getProvider()  : ServiceProvider|null
Get the registered service provider instance if it exists.
getProviders()  : array<string|int, mixed>
Get the registered service provider instances if any exist.
handle()  : Response
Handles a Request to convert it to a Response.
has()  : mixed
{@inheritdoc}
hasBeenBootstrapped()  : bool
Determine if the application has been bootstrapped before.
hasMethodBinding()  : bool
Determine if the container has a method binding.
hasMonologConfigurator()  : bool
Determine if the application has a custom Monolog configurator.
instance()  : mixed
Register an existing instance as shared in the container.
isAlias()  : bool
Determine if a given string is an alias.
isBooted()  : bool
Determine if the application has booted.
isDeferredService()  : bool
Determine if the given service is a deferred service.
isDownForMaintenance()  : bool
Determine if the application is currently down for maintenance.
isLocal()  : bool
Determine if application is in local environment.
isLocale()  : bool
Determine if application locale is the given locale.
isShared()  : bool
Determine if a given type is shared.
langPath()  : string
Get the path to the language files.
loadDeferredProvider()  : void
Load the provider for a deferred service.
loadDeferredProviders()  : void
Load and boot all of the remaining deferred providers.
loadEnvironmentFrom()  : $this
Set the environment file to be loaded during bootstrapping.
make()  : mixed
Resolve the given type from the container.
makeWith()  : mixed
An alias function name for make().
offsetExists()  : bool
Determine if a given offset exists.
offsetGet()  : mixed
Get the value at a given offset.
offsetSet()  : void
Set the value at a given offset.
offsetUnset()  : void
Unset the value at a given offset.
path()  : string
Get the path to the application "app" directory.
provideFacades()  : void
Configure the real-time facade namespace.
publicPath()  : string
Get the path to the public / web directory.
rebinding()  : mixed
Bind a new callback to an abstract's rebind event.
refresh()  : mixed
Refresh an instance on the given target and method.
register()  : ServiceProvider
Register a service provider with the application.
registerConfiguredProviders()  : void
Register all of the configured providers.
registerCoreContainerAliases()  : void
Register the core class aliases in the container.
registerDeferredProvider()  : void
Register a deferred provider and service.
resolved()  : bool
Determine if the given abstract type has been resolved.
resolveProvider()  : ServiceProvider
Resolve a service provider instance from the class name.
resolving()  : void
Register a new resolving callback.
resourcePath()  : string
Get the path to the resources directory.
routesAreCached()  : bool
Determine if the application routes are cached.
runningInConsole()  : bool
Determine if we are running in the console.
runningUnitTests()  : bool
Determine if we are running unit tests.
setBasePath()  : $this
Set the base path for the application.
setDeferredServices()  : void
Set the application's deferred services.
setInstance()  : static
Set the shared instance of the container.
setLocale()  : void
Set the current application locale.
shouldSkipMiddleware()  : bool
Determine if middleware has been disabled for the application.
singleton()  : void
Register a shared binding in the container.
storagePath()  : string
Get the path to the storage directory.
tag()  : void
Assign a set of tags to a given binding.
tagged()  : array<string|int, mixed>
Resolve all of the bindings for a given tag.
terminate()  : void
Terminate the application.
terminating()  : $this
Register a terminating callback with the application.
useDatabasePath()  : $this
Set the database directory.
useEnvironmentPath()  : $this
Set the directory for the environment file.
useStoragePath()  : $this
Set the storage directory.
version()  : string
Get the version number of the application.
when()  : ContextualBindingBuilder
Define a contextual binding.
wrap()  : Closure
Wrap the given closure such that its dependencies will be injected when executed.
bindPathsInContainer()  : void
Bind all of the application paths in the container.
bootProvider()  : mixed
Boot the given service provider.
dropStaleInstances()  : void
Drop all of the stale instances and aliases.
findInContextualBindings()  : string|null
Find the concrete binding for the given abstract in the contextual binding array.
fireAfterResolvingCallbacks()  : void
Fire all of the after resolving callbacks.
fireAppCallbacks()  : void
Call the booting callbacks for the application.
fireCallbackArray()  : void
Fire an array of callbacks with an object.
fireResolvingCallbacks()  : void
Fire all of the resolving callbacks.
getCallbacksForType()  : array<string|int, mixed>
Get all callbacks for a given type.
getClosure()  : Closure
Get the Closure to be used when building a type.
getConcrete()  : mixed
Get the concrete type for a given abstract.
getContextualConcrete()  : string|null
Get the contextual concrete binding for the given abstract.
getExtenders()  : array<string|int, mixed>
Get the extender callbacks for a given type.
getLastParameterOverride()  : array<string|int, mixed>
Get the last parameter override.
getParameterOverride()  : mixed
Get a parameter override for a dependency.
getReboundCallbacks()  : array<string|int, mixed>
Get the rebound callbacks for a given type.
hasParameterOverride()  : bool
Determine if the given dependency has a parameter override.
isBuildable()  : bool
Determine if the given concrete is buildable.
markAsRegistered()  : void
Mark the given provider as registered.
notInstantiable()  : void
Throw an exception that the concrete is not instantiable.
rebound()  : void
Fire the "rebound" callbacks for the given abstract type.
registerBaseBindings()  : void
Register the basic bindings into the container.
registerBaseServiceProviders()  : void
Register all of the base service providers.
removeAbstractAlias()  : void
Remove an alias from the contextual binding alias cache.
resolve()  : mixed
Resolve the given type from the container.
resolveClass()  : mixed
Resolve a class based dependency from the container.
resolveDependencies()  : array<string|int, mixed>
Resolve all of the dependencies from the ReflectionParameters.
resolvePrimitive()  : mixed
Resolve a non-class hinted primitive dependency.
unresolvablePrimitive()  : void
Throw an exception for an unresolvable primitive.

Constants

VERSION

The Laravel framework version.

public string VERSION = '5.5.50'

Properties

$contextual

The contextual binding map.

public array<string|int, mixed> $contextual = []

$abstractAliases

The registered aliases keyed by the abstract name.

protected array<string|int, mixed> $abstractAliases = []

$afterResolvingCallbacks

All of the after resolving callbacks by class type.

protected array<string|int, mixed> $afterResolvingCallbacks = []

$aliases

The registered type aliases.

protected array<string|int, mixed> $aliases = []

$basePath

The base path for the Laravel installation.

protected string $basePath

$bindings

The container's bindings.

protected array<string|int, mixed> $bindings = []

$booted

Indicates if the application has "booted".

protected bool $booted = false

$bootedCallbacks

The array of booted callbacks.

protected array<string|int, mixed> $bootedCallbacks = []

$bootingCallbacks

The array of booting callbacks.

protected array<string|int, mixed> $bootingCallbacks = []

$buildStack

The stack of concretions currently being built.

protected array<string|int, mixed> $buildStack = []

$databasePath

The custom database path defined by the developer.

protected string $databasePath

$deferredServices

The deferred services and their providers.

protected array<string|int, mixed> $deferredServices = []

$environmentFile

The environment file to load during bootstrapping.

protected string $environmentFile = '.env'

$environmentPath

The custom environment path defined by the developer.

protected string $environmentPath

$extenders

The extension closures for services.

protected array<string|int, mixed> $extenders = []

$globalAfterResolvingCallbacks

All of the global after resolving callbacks.

protected array<string|int, mixed> $globalAfterResolvingCallbacks = []

$globalResolvingCallbacks

All of the global resolving callbacks.

protected array<string|int, mixed> $globalResolvingCallbacks = []

$hasBeenBootstrapped

Indicates if the application has been bootstrapped before.

protected bool $hasBeenBootstrapped = false

$instance

The current globally available container (if any).

protected static static $instance

$instances

The container's shared instances.

protected array<string|int, mixed> $instances = []

$loadedProviders

The names of the loaded service providers.

protected array<string|int, mixed> $loadedProviders = []

$methodBindings

The container's method bindings.

protected array<string|int, mixed> $methodBindings = []

$monologConfigurator

A custom callback used to configure Monolog.

protected callable|null $monologConfigurator

$namespace

The application namespace.

protected string $namespace

$reboundCallbacks

All of the registered rebound callbacks.

protected array<string|int, mixed> $reboundCallbacks = []

$resolved

An array of the types that have been resolved.

protected array<string|int, mixed> $resolved = []

$resolvingCallbacks

All of the resolving callbacks by class type.

protected array<string|int, mixed> $resolvingCallbacks = []

$serviceProviders

All of the registered service providers.

protected array<string|int, mixed> $serviceProviders = []

$storagePath

The custom storage path defined by the developer.

protected string $storagePath

$tags

All of the registered tags.

protected array<string|int, mixed> $tags = []

$terminatingCallbacks

The array of terminating callbacks.

protected array<string|int, mixed> $terminatingCallbacks = []

$with

The parameter override stack.

protected array<string|int, mixed> $with = []

Methods

__construct()

Create a new Illuminate application instance.

public __construct([string|null $basePath = null ]) : void
Parameters
$basePath : string|null = null
Return values
void

__get()

Dynamically access container services.

public __get(string $key) : mixed
Parameters
$key : string
Return values
mixed

__set()

Dynamically set container services.

public __set(string $key, mixed $value) : void
Parameters
$key : string
$value : mixed
Return values
void

abort()

Throw an HttpException with the given data.

public abort(int $code[, string $message = '' ][, array<string|int, mixed> $headers = [] ]) : void
Parameters
$code : int
$message : string = ''
$headers : array<string|int, mixed> = []
Tags
throws
HttpException
Return values
void

addContextualBinding()

Add a contextual binding to the container.

public addContextualBinding(string $concrete, string $abstract, Closure|string $implementation) : void
Parameters
$concrete : string
$abstract : string
$implementation : Closure|string
Return values
void

addDeferredServices()

Add an array of services to the application's deferred services.

public addDeferredServices(array<string|int, mixed> $services) : void
Parameters
$services : array<string|int, mixed>
Return values
void

afterBootstrapping()

Register a callback to run after a bootstrapper.

public afterBootstrapping(string $bootstrapper, Closure $callback) : void
Parameters
$bootstrapper : string
$callback : Closure
Return values
void

afterLoadingEnvironment()

Register a callback to run after loading the environment.

public afterLoadingEnvironment(Closure $callback) : void
Parameters
$callback : Closure
Return values
void

afterResolving()

Register a new after resolving callback for all types.

public afterResolving(Closure|string $abstract[, Closure|null $callback = null ]) : void
Parameters
$abstract : Closure|string
$callback : Closure|null = null
Return values
void

alias()

Alias a type to a different name.

public alias(string $abstract, string $alias) : void
Parameters
$abstract : string
$alias : string
Return values
void

basePath()

Get the base path of the Laravel installation.

public basePath([string $path = '' ]) : string
Parameters
$path : string = ''

Optionally, a path to append to the base path

Return values
string

beforeBootstrapping()

Register a callback to run before a bootstrapper.

public beforeBootstrapping(string $bootstrapper, Closure $callback) : void
Parameters
$bootstrapper : string
$callback : Closure
Return values
void

bind()

Register a binding with the container.

public bind(string $abstract[, Closure|string|null $concrete = null ][, bool $shared = false ]) : void
Parameters
$abstract : string
$concrete : Closure|string|null = null
$shared : bool = false
Return values
void

bindIf()

Register a binding if it hasn't already been registered.

public bindIf(string $abstract[, Closure|string|null $concrete = null ][, bool $shared = false ]) : void
Parameters
$abstract : string
$concrete : Closure|string|null = null
$shared : bool = false
Return values
void

bindMethod()

Bind a callback to resolve with Container::call.

public bindMethod(string $method, Closure $callback) : void
Parameters
$method : string
$callback : Closure
Return values
void

boot()

Boot the application's service providers.

public boot() : void
Return values
void

booted()

Register a new "booted" listener.

public booted(mixed $callback) : void
Parameters
$callback : mixed
Return values
void

booting()

Register a new boot listener.

public booting(mixed $callback) : void
Parameters
$callback : mixed
Return values
void

bootstrapPath()

Get the path to the bootstrap directory.

public bootstrapPath([string $path = '' ]) : string
Parameters
$path : string = ''

Optionally, a path to append to the bootstrap path

Return values
string

bootstrapWith()

Run the given array of bootstrap classes.

public bootstrapWith(array<string|int, mixed> $bootstrappers) : void
Parameters
$bootstrappers : array<string|int, mixed>
Return values
void

bound()

Determine if the given abstract type has been bound.

public bound(string $abstract) : bool

(Overriding Container::bound)

Parameters
$abstract : string
Return values
bool

build()

Instantiate a concrete instance of the given type.

public build(string $concrete) : mixed
Parameters
$concrete : string
Tags
throws
BindingResolutionException
Return values
mixed

call()

Call the given Closure / class@method and inject its dependencies.

public call(callable|string $callback[, array<string|int, mixed> $parameters = [] ][, string|null $defaultMethod = null ]) : mixed
Parameters
$callback : callable|string
$parameters : array<string|int, mixed> = []
$defaultMethod : string|null = null
Return values
mixed

callMethodBinding()

Get the method binding for the given method.

public callMethodBinding(string $method, mixed $instance) : mixed
Parameters
$method : string
$instance : mixed
Return values
mixed

configPath()

Get the path to the application configuration files.

public configPath([string $path = '' ]) : string
Parameters
$path : string = ''

Optionally, a path to append to the config path

Return values
string

configurationIsCached()

Determine if the application configuration is cached.

public configurationIsCached() : bool
Return values
bool

configureMonologUsing()

Define a callback to be used to configure Monolog.

public configureMonologUsing(callable $callback) : $this
Parameters
$callback : callable
Return values
$this

databasePath()

Get the path to the database directory.

public databasePath([string $path = '' ]) : string
Parameters
$path : string = ''

Optionally, a path to append to the database path

Return values
string

detectEnvironment()

Detect the application's current environment.

public detectEnvironment(Closure $callback) : string
Parameters
$callback : Closure
Return values
string

environment()

Get or check the current application environment.

public environment() : string|bool
Return values
string|bool

environmentFile()

Get the environment file the application is using.

public environmentFile() : string
Return values
string

environmentFilePath()

Get the fully qualified path to the environment file.

public environmentFilePath() : string
Return values
string

environmentPath()

Get the path to the environment file directory.

public environmentPath() : string
Return values
string

extend()

"Extend" an abstract type in the container.

public extend(string $abstract, Closure $closure) : void
Parameters
$abstract : string
$closure : Closure
Tags
throws
InvalidArgumentException
Return values
void

factory()

Get a closure to resolve the given type from the container.

public factory(string $abstract) : Closure
Parameters
$abstract : string
Return values
Closure

flush()

Flush the container of all bindings and resolved instances.

public flush() : void
Return values
void

forgetExtenders()

Remove all of the extender callbacks for a given type.

public forgetExtenders(string $abstract) : void
Parameters
$abstract : string
Return values
void

forgetInstance()

Remove a resolved instance from the instance cache.

public forgetInstance(string $abstract) : void
Parameters
$abstract : string
Return values
void

forgetInstances()

Clear all of the instances from the container.

public forgetInstances() : void
Return values
void

get()

{@inheritdoc}

public get(mixed $id) : mixed
Parameters
$id : mixed
Return values
mixed

getAlias()

Get the alias for an abstract if available.

public getAlias(string $abstract) : string
Parameters
$abstract : string
Tags
throws
LogicException
Return values
string

getBindings()

Get the container's bindings.

public getBindings() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCachedConfigPath()

Get the path to the configuration cache file.

public getCachedConfigPath() : string
Return values
string

getCachedPackagesPath()

Get the path to the cached packages.php file.

public getCachedPackagesPath() : string
Return values
string

getCachedRoutesPath()

Get the path to the routes cache file.

public getCachedRoutesPath() : string
Return values
string

getCachedServicesPath()

Get the path to the cached services.php file.

public getCachedServicesPath() : string
Return values
string

getDeferredServices()

Get the application's deferred services.

public getDeferredServices() : array<string|int, mixed>
Return values
array<string|int, mixed>

getInstance()

Set the globally available instance of the container.

public static getInstance() : static
Return values
static

getLoadedProviders()

Get the service providers that have been loaded.

public getLoadedProviders() : array<string|int, mixed>
Return values
array<string|int, mixed>

getLocale()

Get the current application locale.

public getLocale() : string
Return values
string

getMonologConfigurator()

Get the custom Monolog configurator for the application.

public getMonologConfigurator() : callable
Return values
callable

getNamespace()

Get the application namespace.

public getNamespace() : string
Tags
throws
RuntimeException
Return values
string

getProviders()

Get the registered service provider instances if any exist.

public getProviders(ServiceProvider|string $provider) : array<string|int, mixed>
Parameters
$provider : ServiceProvider|string
Return values
array<string|int, mixed>

handle()

Handles a Request to convert it to a Response.

public handle(Request $request[, mixed $type = self::MASTER_REQUEST ][, mixed $catch = true ]) : Response
Parameters
$request : Request

A Request instance

$type : mixed = self::MASTER_REQUEST

The type of the request (one of HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST)

$catch : mixed = true

Whether to catch exceptions or not

Return values
Response

A Response instance

has()

{@inheritdoc}

public has(mixed $id) : mixed
Parameters
$id : mixed
Return values
mixed

hasBeenBootstrapped()

Determine if the application has been bootstrapped before.

public hasBeenBootstrapped() : bool
Return values
bool

hasMethodBinding()

Determine if the container has a method binding.

public hasMethodBinding(string $method) : bool
Parameters
$method : string
Return values
bool

hasMonologConfigurator()

Determine if the application has a custom Monolog configurator.

public hasMonologConfigurator() : bool
Return values
bool

instance()

Register an existing instance as shared in the container.

public instance(string $abstract, mixed $instance) : mixed
Parameters
$abstract : string
$instance : mixed
Return values
mixed

isAlias()

Determine if a given string is an alias.

public isAlias(string $name) : bool
Parameters
$name : string
Return values
bool

isBooted()

Determine if the application has booted.

public isBooted() : bool
Return values
bool

isDeferredService()

Determine if the given service is a deferred service.

public isDeferredService(string $service) : bool
Parameters
$service : string
Return values
bool

isDownForMaintenance()

Determine if the application is currently down for maintenance.

public isDownForMaintenance() : bool
Return values
bool

isLocal()

Determine if application is in local environment.

public isLocal() : bool
Return values
bool

isLocale()

Determine if application locale is the given locale.

public isLocale(string $locale) : bool
Parameters
$locale : string
Return values
bool

isShared()

Determine if a given type is shared.

public isShared(string $abstract) : bool
Parameters
$abstract : string
Return values
bool

langPath()

Get the path to the language files.

public langPath() : string
Return values
string

loadDeferredProvider()

Load the provider for a deferred service.

public loadDeferredProvider(string $service) : void
Parameters
$service : string
Return values
void

loadDeferredProviders()

Load and boot all of the remaining deferred providers.

public loadDeferredProviders() : void
Return values
void

loadEnvironmentFrom()

Set the environment file to be loaded during bootstrapping.

public loadEnvironmentFrom(string $file) : $this
Parameters
$file : string
Return values
$this

make()

Resolve the given type from the container.

public make(string $abstract[, array<string|int, mixed> $parameters = [] ]) : mixed

(Overriding Container::make)

Parameters
$abstract : string
$parameters : array<string|int, mixed> = []
Return values
mixed

makeWith()

An alias function name for make().

public makeWith(string $abstract[, array<string|int, mixed> $parameters = [] ]) : mixed
Parameters
$abstract : string
$parameters : array<string|int, mixed> = []
Return values
mixed

offsetExists()

Determine if a given offset exists.

public offsetExists(string $key) : bool
Parameters
$key : string
Return values
bool

offsetGet()

Get the value at a given offset.

public offsetGet(string $key) : mixed
Parameters
$key : string
Return values
mixed

offsetSet()

Set the value at a given offset.

public offsetSet(string $key, mixed $value) : void
Parameters
$key : string
$value : mixed
Return values
void

offsetUnset()

Unset the value at a given offset.

public offsetUnset(string $key) : void
Parameters
$key : string
Return values
void

path()

Get the path to the application "app" directory.

public path([string $path = '' ]) : string
Parameters
$path : string = ''

Optionally, a path to append to the app path

Return values
string

provideFacades()

Configure the real-time facade namespace.

public provideFacades(string $namespace) : void
Parameters
$namespace : string
Return values
void

publicPath()

Get the path to the public / web directory.

public publicPath() : string
Return values
string

rebinding()

Bind a new callback to an abstract's rebind event.

public rebinding(string $abstract, Closure $callback) : mixed
Parameters
$abstract : string
$callback : Closure
Return values
mixed

refresh()

Refresh an instance on the given target and method.

public refresh(string $abstract, mixed $target, string $method) : mixed
Parameters
$abstract : string
$target : mixed
$method : string
Return values
mixed

registerConfiguredProviders()

Register all of the configured providers.

public registerConfiguredProviders() : void
Return values
void

registerCoreContainerAliases()

Register the core class aliases in the container.

public registerCoreContainerAliases() : void
Return values
void

registerDeferredProvider()

Register a deferred provider and service.

public registerDeferredProvider(string $provider[, string|null $service = null ]) : void
Parameters
$provider : string
$service : string|null = null
Return values
void

resolved()

Determine if the given abstract type has been resolved.

public resolved(string $abstract) : bool
Parameters
$abstract : string
Return values
bool

resolving()

Register a new resolving callback.

public resolving(Closure|string $abstract[, Closure|null $callback = null ]) : void
Parameters
$abstract : Closure|string
$callback : Closure|null = null
Return values
void

resourcePath()

Get the path to the resources directory.

public resourcePath([string $path = '' ]) : string
Parameters
$path : string = ''
Return values
string

routesAreCached()

Determine if the application routes are cached.

public routesAreCached() : bool
Return values
bool

runningInConsole()

Determine if we are running in the console.

public runningInConsole() : bool
Return values
bool

runningUnitTests()

Determine if we are running unit tests.

public runningUnitTests() : bool
Return values
bool

setBasePath()

Set the base path for the application.

public setBasePath(string $basePath) : $this
Parameters
$basePath : string
Return values
$this

setDeferredServices()

Set the application's deferred services.

public setDeferredServices(array<string|int, mixed> $services) : void
Parameters
$services : array<string|int, mixed>
Return values
void

setInstance()

Set the shared instance of the container.

public static setInstance([Container|null $container = null ]) : static
Parameters
$container : Container|null = null
Return values
static

setLocale()

Set the current application locale.

public setLocale(string $locale) : void
Parameters
$locale : string
Return values
void

shouldSkipMiddleware()

Determine if middleware has been disabled for the application.

public shouldSkipMiddleware() : bool
Return values
bool

singleton()

Register a shared binding in the container.

public singleton(string $abstract[, Closure|string|null $concrete = null ]) : void
Parameters
$abstract : string
$concrete : Closure|string|null = null
Return values
void

storagePath()

Get the path to the storage directory.

public storagePath() : string
Return values
string

tag()

Assign a set of tags to a given binding.

public tag(array<string|int, mixed>|string $abstracts, array<string|int, mixed>|mixed ...$tags) : void
Parameters
$abstracts : array<string|int, mixed>|string
$tags : array<string|int, mixed>|mixed
Return values
void

tagged()

Resolve all of the bindings for a given tag.

public tagged(string $tag) : array<string|int, mixed>
Parameters
$tag : string
Return values
array<string|int, mixed>

terminate()

Terminate the application.

public terminate() : void
Return values
void

terminating()

Register a terminating callback with the application.

public terminating(Closure $callback) : $this
Parameters
$callback : Closure
Return values
$this

useDatabasePath()

Set the database directory.

public useDatabasePath(string $path) : $this
Parameters
$path : string
Return values
$this

useEnvironmentPath()

Set the directory for the environment file.

public useEnvironmentPath(string $path) : $this
Parameters
$path : string
Return values
$this

useStoragePath()

Set the storage directory.

public useStoragePath(string $path) : $this
Parameters
$path : string
Return values
$this

version()

Get the version number of the application.

public version() : string
Return values
string

wrap()

Wrap the given closure such that its dependencies will be injected when executed.

public wrap(Closure $callback[, array<string|int, mixed> $parameters = [] ]) : Closure
Parameters
$callback : Closure
$parameters : array<string|int, mixed> = []
Return values
Closure

bindPathsInContainer()

Bind all of the application paths in the container.

protected bindPathsInContainer() : void
Return values
void

dropStaleInstances()

Drop all of the stale instances and aliases.

protected dropStaleInstances(string $abstract) : void
Parameters
$abstract : string
Return values
void

findInContextualBindings()

Find the concrete binding for the given abstract in the contextual binding array.

protected findInContextualBindings(string $abstract) : string|null
Parameters
$abstract : string
Return values
string|null

fireAfterResolvingCallbacks()

Fire all of the after resolving callbacks.

protected fireAfterResolvingCallbacks(string $abstract, mixed $object) : void
Parameters
$abstract : string
$object : mixed
Return values
void

fireAppCallbacks()

Call the booting callbacks for the application.

protected fireAppCallbacks(array<string|int, mixed> $callbacks) : void
Parameters
$callbacks : array<string|int, mixed>
Return values
void

fireCallbackArray()

Fire an array of callbacks with an object.

protected fireCallbackArray(mixed $object, array<string|int, mixed> $callbacks) : void
Parameters
$object : mixed
$callbacks : array<string|int, mixed>
Return values
void

fireResolvingCallbacks()

Fire all of the resolving callbacks.

protected fireResolvingCallbacks(string $abstract, mixed $object) : void
Parameters
$abstract : string
$object : mixed
Return values
void

getCallbacksForType()

Get all callbacks for a given type.

protected getCallbacksForType(string $abstract, object $object, array<string|int, mixed> $callbacksPerType) : array<string|int, mixed>
Parameters
$abstract : string
$object : object
$callbacksPerType : array<string|int, mixed>
Return values
array<string|int, mixed>

getClosure()

Get the Closure to be used when building a type.

protected getClosure(string $abstract, string $concrete) : Closure
Parameters
$abstract : string
$concrete : string
Return values
Closure

getConcrete()

Get the concrete type for a given abstract.

protected getConcrete(string $abstract) : mixed
Parameters
$abstract : string
Return values
mixed

$concrete

getContextualConcrete()

Get the contextual concrete binding for the given abstract.

protected getContextualConcrete(string $abstract) : string|null
Parameters
$abstract : string
Return values
string|null

getExtenders()

Get the extender callbacks for a given type.

protected getExtenders(string $abstract) : array<string|int, mixed>
Parameters
$abstract : string
Return values
array<string|int, mixed>

getLastParameterOverride()

Get the last parameter override.

protected getLastParameterOverride() : array<string|int, mixed>
Return values
array<string|int, mixed>

getParameterOverride()

Get a parameter override for a dependency.

protected getParameterOverride(ReflectionParameter $dependency) : mixed
Parameters
$dependency : ReflectionParameter
Return values
mixed

getReboundCallbacks()

Get the rebound callbacks for a given type.

protected getReboundCallbacks(string $abstract) : array<string|int, mixed>
Parameters
$abstract : string
Return values
array<string|int, mixed>

hasParameterOverride()

Determine if the given dependency has a parameter override.

protected hasParameterOverride(ReflectionParameter $dependency) : bool
Parameters
$dependency : ReflectionParameter
Return values
bool

isBuildable()

Determine if the given concrete is buildable.

protected isBuildable(mixed $concrete, string $abstract) : bool
Parameters
$concrete : mixed
$abstract : string
Return values
bool

notInstantiable()

Throw an exception that the concrete is not instantiable.

protected notInstantiable(string $concrete) : void
Parameters
$concrete : string
Tags
throws
BindingResolutionException
Return values
void

rebound()

Fire the "rebound" callbacks for the given abstract type.

protected rebound(string $abstract) : void
Parameters
$abstract : string
Return values
void

registerBaseBindings()

Register the basic bindings into the container.

protected registerBaseBindings() : void
Return values
void

registerBaseServiceProviders()

Register all of the base service providers.

protected registerBaseServiceProviders() : void
Return values
void

removeAbstractAlias()

Remove an alias from the contextual binding alias cache.

protected removeAbstractAlias(string $searched) : void
Parameters
$searched : string
Return values
void

resolve()

Resolve the given type from the container.

protected resolve(string $abstract[, array<string|int, mixed> $parameters = [] ]) : mixed
Parameters
$abstract : string
$parameters : array<string|int, mixed> = []
Return values
mixed

resolveClass()

Resolve a class based dependency from the container.

protected resolveClass(ReflectionParameter $parameter) : mixed
Parameters
$parameter : ReflectionParameter
Tags
throws
BindingResolutionException
Return values
mixed

resolveDependencies()

Resolve all of the dependencies from the ReflectionParameters.

protected resolveDependencies(array<string|int, mixed> $dependencies) : array<string|int, mixed>
Parameters
$dependencies : array<string|int, mixed>
Return values
array<string|int, mixed>

resolvePrimitive()

Resolve a non-class hinted primitive dependency.

protected resolvePrimitive(ReflectionParameter $parameter) : mixed
Parameters
$parameter : ReflectionParameter
Tags
throws
BindingResolutionException
Return values
mixed

unresolvablePrimitive()

Throw an exception for an unresolvable primitive.

protected unresolvablePrimitive(ReflectionParameter $parameter) : void
Parameters
$parameter : ReflectionParameter
Tags
throws
BindingResolutionException
Return values
void

Search results