class
App extends Facade (View source)
Properties
static protected Application|null
|
$app |
The application instance being facaded. |
from
Facade |
static protected array
|
$resolvedInstance |
The resolved object instances. |
from
Facade |
static protected bool
|
$cached |
Indicates if the resolved instance should be cached. |
from
Facade |
Methods
static void
resolved(
Closure $callback)
Run a Closure when the facade has been resolved.
spy()
Convert the facade into a Mockery spy.
expects()
Initiate a mock expectation on the facade.
createMock()
Create a fresh mock instance for the given class.
static bool
isMock()
Determines whether a mock is set as the instance of the facade.
static void
swap(mixed $instance)
Hotswap the underlying instance behind the facade.
static bool
isFake()
Determines whether a "fake" has been set as the facade instance.
static mixed
__callStatic(string $method, array $args)
Handle dynamic, static calls to the object.
configure(string|null $basePath = null)
No description
static string
path(string $path = '')
No description
static string
basePath(string $path = '')
No description
static string
langPath(string $path = '')
No description
static string
viewPath(string $path = '')
No description
static string
joinPaths(string $basePath, string $path = '')
No description
register(
ServiceProvider|string $provider, bool $force = false)
No description
static
ServiceProvider|null
getProvider(
ServiceProvider|string $provider)
No description
static array
getProviders(
ServiceProvider|string $provider)
No description
static object|mixed
make(string $abstract, array $parameters = [])
No description
static bool
bound(string $abstract)
No description
static void
booting(callable $callback)
No description
static void
booted(callable $callback)
No description
handle(
Request $request, int $type = 1, bool $catch = true)
No description
static never
abort(int $code, string $message = '', array $headers = [])
No description
when(array|string $concrete)
No description
static bool
has(string $id)
No description
static bool
isShared(string $abstract)
No description
static bool
isAlias(string $name)
No description
static void
bind(Closure|string $abstract, Closure|string|null $concrete = null, bool $shared = false)
No description
static void
addContextualBinding(string $concrete, Closure|string $abstract, Closure|string $implementation)
No description
static void
bindIf(Closure|string $abstract, Closure|string|null $concrete = null, bool $shared = false)
No description
static void
singleton(Closure|string $abstract, Closure|string|null $concrete = null)
No description
static void
singletonIf(Closure|string $abstract, Closure|string|null $concrete = null)
No description
static void
scoped(Closure|string $abstract, Closure|string|null $concrete = null)
No description
static void
scopedIf(Closure|string $abstract, Closure|string|null $concrete = null)
No description
static mixed
instance(string $abstract, mixed $instance)
No description
static void
tag(array|string $abstracts, array|mixed $tags)
No description
static iterable
tagged(string $tag)
No description
static void
alias(string $abstract, string $alias)
No description
static mixed
refresh(string $abstract, mixed $target, string $method)
No description
wrap(
Closure $callback, array $parameters = [])
No description
static mixed
call(callable|string $callback, array $parameters = [], string|null $defaultMethod = null)
No description
factory(string $abstract)
No description
static object|mixed
makeWith(string|callable $abstract, array $parameters = [])
No description
static object|mixed
get(string $id)
No description
static object
build(Closure|string $concrete)
No description
static void
beforeResolving(Closure|string $abstract, Closure|null $callback = null)
No description
static void
resolving(Closure|string $abstract, Closure|null $callback = null)
No description
static void
afterResolving(Closure|string $abstract, Closure|null $callback = null)
No description
static string
getAlias(string $abstract)
No description
setInstance(
Container|null $container = null)
No description
static void
macro(string $name, object|callable $macro)
No description
static void
mixin(object $mixin, bool $replace = true)
No description
Details
Run a Closure when the facade has been resolved.
Convert the facade into a Mockery spy.
static MockInterface
partialMock()
Initiate a partial mock on the facade.
static Expectation
shouldReceive()
Initiate a mock expectation on the facade.
Initiate a mock expectation on the facade.
static protected MockInterface
createFreshMockInstance()
Create a fresh mock instance for the given class.
static protected MockInterface
createMock()
Create a fresh mock instance for the given class.
static protected bool
isMock()
Determines whether a mock is set as the instance of the facade.
static protected string|null
getMockableClass()
Get the mockable class for the bound instance.
static void
swap(mixed $instance)
Hotswap the underlying instance behind the facade.
Determines whether a "fake" has been set as the facade instance.
Get the root object behind the facade.
static protected string
getFacadeAccessor()
Get the registered name of the component.
static protected mixed
resolveFacadeInstance(string $name)
Resolve the facade root instance from the container.
static void
clearResolvedInstance(string $name)
Clear a resolved facade instance.
static void
clearResolvedInstances()
Clear all of the resolved instances.
Get the application default aliases.
Get the application instance behind the facade.
Set the application instance.
static mixed
__callStatic(string $method, array $args)
Handle dynamic, static calls to the object.
static string
inferBasePath()
static void
bootstrapWith(string[] $bootstrappers)
static void
afterLoadingEnvironment(Closure $callback)
static void
beforeBootstrapping(string $bootstrapper, Closure $callback)
static void
afterBootstrapping(string $bootstrapper, Closure $callback)
static bool
hasBeenBootstrapped()
static string
path(string $path = '')
static string
basePath(string $path = '')
static string
bootstrapPath(string $path = '')
static string
getBootstrapProvidersPath()
static string
configPath(string $path = '')
static string
databasePath(string $path = '')
static string
langPath(string $path = '')
static string
publicPath(string $path = '')
static string
storagePath(string $path = '')
static string
resourcePath(string $path = '')
static string
viewPath(string $path = '')
static string
joinPaths(string $basePath, string $path = '')
static string
environmentPath()
static string
environmentFile()
static string
environmentFilePath()
static string|bool
environment(string|array $environments)
static bool
isProduction()
static string
detectEnvironment(Closure $callback)
static bool
runningInConsole()
static bool
runningConsoleCommand(string|array $commands)
static bool
runningUnitTests()
static bool
hasDebugModeEnabled()
static void
registered(callable $callback)
static ServiceProvider
register(ServiceProvider|string $provider, bool $force = false)
static ServiceProvider|null
getProvider(ServiceProvider|string $provider)
static array
getProviders(ServiceProvider|string $provider)
static void
loadDeferredProviders()
static void
loadDeferredProvider(string $service)
static void
registerDeferredProvider(string $provider, string|null $service = null)
static object|mixed
make(string $abstract, array $parameters = [])
static bool
bound(string $abstract)
static void
booting(callable $callback)
static void
booted(callable $callback)
static Response
handle(Request $request, int $type = 1, bool $catch = true)
static void
handleRequest(Request $request)
static int
handleCommand(InputInterface $input)
static bool
shouldMergeFrameworkConfiguration()
static bool
shouldSkipMiddleware()
static string
getCachedServicesPath()
static string
getCachedPackagesPath()
static bool
configurationIsCached()
static string
getCachedConfigPath()
static bool
routesAreCached()
static string
getCachedRoutesPath()
static bool
eventsAreCached()
static string
getCachedEventsPath()
static Application
addAbsoluteCachePathPrefix(string $prefix)
static bool
isDownForMaintenance()
static never
abort(int $code, string $message = '', array $headers = [])
static Application
terminating(callable|string $callback)
static array
getLoadedProviders()
static bool
providerIsLoaded(string $provider)
static array
getDeferredServices()
static void
setDeferredServices(array $services)
static bool
isDeferredService(string $service)
static void
addDeferredServices(array $services)
static void
removeDeferredServices(array $services)
static void
provideFacades(string $namespace)
static string
getLocale()
static string
currentLocale()
static string
getFallbackLocale()
static void
setLocale(string $locale)
static void
setFallbackLocale(string $fallbackLocale)
static bool
isLocale(string $locale)
static void
registerCoreContainerAliases()
static string
getNamespace()
static void
whenHasAttribute(string $attribute, Closure $handler)
static bool
has(string $id)
static bool
isShared(string $abstract)
static bool
isAlias(string $name)
static void
bind(Closure|string $abstract, Closure|string|null $concrete = null, bool $shared = false)
static bool
hasMethodBinding(string $method)
static void
bindMethod(array|string $method, Closure $callback)
static mixed
callMethodBinding(string $method, mixed $instance)
static void
addContextualBinding(string $concrete, Closure|string $abstract, Closure|string $implementation)
static void
bindIf(Closure|string $abstract, Closure|string|null $concrete = null, bool $shared = false)
static void
singleton(Closure|string $abstract, Closure|string|null $concrete = null)
static void
singletonIf(Closure|string $abstract, Closure|string|null $concrete = null)
static void
scoped(Closure|string $abstract, Closure|string|null $concrete = null)
static void
scopedIf(Closure|string $abstract, Closure|string|null $concrete = null)
static void
extend(string $abstract, Closure $closure)
static mixed
instance(string $abstract, mixed $instance)
static void
tag(array|string $abstracts, array|mixed $tags)
static iterable
tagged(string $tag)
static void
alias(string $abstract, string $alias)
static mixed
rebinding(string $abstract, Closure $callback)
static mixed
refresh(string $abstract, mixed $target, string $method)
static mixed
call(callable|string $callback, array $parameters = [], string|null $defaultMethod = null)
static object|mixed
makeWith(string|callable $abstract, array $parameters = [])
static object|mixed
get(string $id)
static object
build(Closure|string $concrete)
static mixed
resolveFromAttribute(ReflectionAttribute $attribute)
static void
beforeResolving(Closure|string $abstract, Closure|null $callback = null)
static void
resolving(Closure|string $abstract, Closure|null $callback = null)
static void
afterResolving(Closure|string $abstract, Closure|null $callback = null)
static void
afterResolvingAttribute(string $attribute, Closure $callback)
static void
fireAfterResolvingAttributeCallbacks(ReflectionAttribute[] $attributes, mixed $object)
static array
getBindings()
static string
getAlias(string $abstract)
static void
forgetExtenders(string $abstract)
static void
forgetInstance(string $abstract)
static void
forgetInstances()
static void
forgetScopedInstances()
static Application
setInstance(Container|null $container = null)
static void
macro(string $name, object|callable $macro)
static void
mixin(object $mixin, bool $replace = true)
static bool
hasMacro(string $name)
static void
flushMacros()