class App extends Facade (View source)

Properties

static protected Application $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.

from  Facade
static MockInterface
spy()

Convert the facade into a Mockery spy.

from  Facade
static MockInterface
partialMock()

Initiate a partial mock on the facade.

from  Facade
static Expectation
shouldReceive()

Initiate a mock expectation on the facade.

from  Facade
static Expectation
expects()

Initiate a mock expectation on the facade.

from  Facade
static MockInterface
createFreshMockInstance()

Create a fresh mock instance for the given class.

from  Facade
static MockInterface
createMock()

Create a fresh mock instance for the given class.

from  Facade
static bool
isMock()

Determines whether a mock is set as the instance of the facade.

from  Facade
static string|null
getMockableClass()

Get the mockable class for the bound instance.

from  Facade
static void
swap(mixed $instance)

Hotswap the underlying instance behind the facade.

from  Facade
static mixed
getFacadeRoot()

Get the root object behind the facade.

from  Facade
static string
getFacadeAccessor()

Get the registered name of the component.

static mixed
resolveFacadeInstance(string $name)

Resolve the facade root instance from the container.

from  Facade
static void
clearResolvedInstance(string $name)

Clear a resolved facade instance.

from  Facade
static void
clearResolvedInstances()

Clear all of the resolved instances.

from  Facade
static Collection
defaultAliases()

Get the application default aliases.

from  Facade
static Application
getFacadeApplication()

Get the application instance behind the facade.

from  Facade
static void
setFacadeApplication(Application $app)

Set the application instance.

from  Facade
static mixed
__callStatic(string $method, array $args)

Handle dynamic, static calls to the object.

from  Facade
static string
version()

No description

static void
bootstrapWith(string[] $bootstrappers)

No description

static void
afterLoadingEnvironment(Closure $callback)

No description

static void
beforeBootstrapping(string $bootstrapper, Closure $callback)

No description

static void
afterBootstrapping(string $bootstrapper, Closure $callback)

No description

static bool
hasBeenBootstrapped()

No description

static Application
setBasePath(string $basePath)

No description

static string
path(string $path = '')

No description

static Application
useAppPath(string $path)

No description

static string
basePath(string $path = '')

No description

static string
bootstrapPath(string $path = '')

No description

static string
configPath(string $path = '')

No description

static string
databasePath(string $path = '')

No description

static Application
useDatabasePath(string $path)

No description

static string
langPath(string $path = '')

No description

static Application
useLangPath(string $path)

No description

static string
publicPath()

No description

static string
storagePath(string $path = '')

No description

static Application
useStoragePath(string $path)

No description

static string
resourcePath(string $path = '')

No description

static string
viewPath(string $path = '')

No description

static string
environmentPath()

No description

static Application
useEnvironmentPath(string $path)

No description

static Application
loadEnvironmentFrom(string $file)

No description

static string
environmentFile()

No description

static string
environmentFilePath()

No description

static string|bool
environment(string|array $environments)

No description

static bool
isLocal()

No description

static bool
isProduction()

No description

static string
detectEnvironment(Closure $callback)

No description

static bool
runningInConsole()

No description

static bool
runningUnitTests()

No description

static bool
hasDebugModeEnabled()

No description

static void
registerConfiguredProviders()

No description

static ServiceProvider
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 ServiceProvider
resolveProvider(string $provider)

No description

static void
loadDeferredProviders()

No description

static void
loadDeferredProvider(string $service)

No description

static void
registerDeferredProvider(string $provider, string|null $service = null)

No description

static mixed
make(string $abstract, array $parameters = [])

No description

static bool
bound(string $abstract)

No description

static bool
isBooted()

No description

static void
boot()

No description

static void
booting(callable $callback)

No description

static void
booted(callable $callback)

No description

static Response
handle(Request $request, int $type = 1, bool $catch = true)

No description

static bool
shouldSkipMiddleware()

No description

static string
getCachedServicesPath()

No description

static string
getCachedPackagesPath()

No description

static bool
configurationIsCached()

No description

static string
getCachedConfigPath()

No description

static bool
routesAreCached()

No description

static string
getCachedRoutesPath()

No description

static bool
eventsAreCached()

No description

static string
getCachedEventsPath()

No description

static Application
addAbsoluteCachePathPrefix(string $prefix)

No description

static MaintenanceMode
maintenanceMode()

No description

static bool
isDownForMaintenance()

No description

static never
abort(int $code, string $message = '', array $headers = [])

No description

static Application
terminating(callable|string $callback)

No description

static void
terminate()

No description

static array
getLoadedProviders()

No description

static bool
providerIsLoaded(string $provider)

No description

static array
getDeferredServices()

No description

static void
setDeferredServices(array $services)

No description

static void
addDeferredServices(array $services)

No description

static bool
isDeferredService(string $service)

No description

static void
provideFacades(string $namespace)

No description

static string
getLocale()

No description

static string
currentLocale()

No description

static string
getFallbackLocale()

No description

static void
setLocale(string $locale)

No description

static void
setFallbackLocale(string $fallbackLocale)

No description

static bool
isLocale(string $locale)

No description

static void
registerCoreContainerAliases()

No description

static void
flush()

No description

static string
getNamespace()

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(string $abstract, Closure|string|null $concrete = null, bool $shared = false)

No description

static bool
hasMethodBinding(string $method)

No description

static void
bindMethod(array|string $method, Closure $callback)

No description

static mixed
callMethodBinding(string $method, mixed $instance)

No description

static void
addContextualBinding(string $concrete, string $abstract, Closure|string $implementation)

No description

static void
bindIf(string $abstract, Closure|string|null $concrete = null, bool $shared = false)

No description

static void
singleton(string $abstract, Closure|string|null $concrete = null)

No description

static void
singletonIf(string $abstract, Closure|string|null $concrete = null)

No description

static void
scoped(string $abstract, Closure|string|null $concrete = null)

No description

static void
scopedIf(string $abstract, Closure|string|null $concrete = null)

No description

static void
extend(string $abstract, Closure $closure)

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
rebinding(string $abstract, Closure $callback)

No description

static mixed
refresh(string $abstract, mixed $target, string $method)

No description

static Closure
wrap(Closure $callback, array $parameters = [])

No description

static mixed
call(callable|string $callback, array $parameters = [], string|null $defaultMethod = null)

No description

static Closure
factory(string $abstract)

No description

static mixed
makeWith(string|callable $abstract, array $parameters = [])

No description

static mixed
get(string $id)

No description

static mixed
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 array
getBindings()

No description

static string
getAlias(string $abstract)

No description

static void
forgetExtenders(string $abstract)

No description

static void
forgetInstance(string $abstract)

No description

static void
forgetInstances()

No description

static void
forgetScopedInstances()

No description

static Application
getInstance()

No description

static Application
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

static bool
hasMacro(string $name)

No description

static void
flushMacros()

No description

Details

static void resolved(Closure $callback)

Run a Closure when the facade has been resolved.

Parameters

Closure $callback

Return Value

void

static MockInterface spy()

Convert the facade into a Mockery spy.

Return Value

MockInterface

static MockInterface partialMock()

Initiate a partial mock on the facade.

Return Value

MockInterface

static Expectation shouldReceive()

Initiate a mock expectation on the facade.

Return Value

Expectation

static Expectation expects()

Initiate a mock expectation on the facade.

Return Value

Expectation

static protected MockInterface createFreshMockInstance()

Create a fresh mock instance for the given class.

Return Value

MockInterface

static protected MockInterface createMock()

Create a fresh mock instance for the given class.

Return Value

MockInterface

static protected bool isMock()

Determines whether a mock is set as the instance of the facade.

Return Value

bool

static protected string|null getMockableClass()

Get the mockable class for the bound instance.

Return Value

string|null

static void swap(mixed $instance)

Hotswap the underlying instance behind the facade.

Parameters

mixed $instance

Return Value

void

static mixed getFacadeRoot()

Get the root object behind the facade.

Return Value

mixed

static protected string getFacadeAccessor()

Get the registered name of the component.

Return Value

string

static protected mixed resolveFacadeInstance(string $name)

Resolve the facade root instance from the container.

Parameters

string $name

Return Value

mixed

static void clearResolvedInstance(string $name)

Clear a resolved facade instance.

Parameters

string $name

Return Value

void

static void clearResolvedInstances()

Clear all of the resolved instances.

Return Value

void

static Collection defaultAliases()

Get the application default aliases.

Return Value

Collection

static Application getFacadeApplication()

Get the application instance behind the facade.

Return Value

Application

static void setFacadeApplication(Application $app)

Set the application instance.

Parameters

Application $app

Return Value

void

static mixed __callStatic(string $method, array $args)

Handle dynamic, static calls to the object.

Parameters

string $method
array $args

Return Value

mixed

Exceptions

RuntimeException

static string version()

No description

Return Value

string

static void bootstrapWith(string[] $bootstrappers)

No description

Parameters

string[] $bootstrappers

Return Value

void

static void afterLoadingEnvironment(Closure $callback)

No description

Parameters

Closure $callback

Return Value

void

static void beforeBootstrapping(string $bootstrapper, Closure $callback)

No description

Parameters

string $bootstrapper
Closure $callback

Return Value

void

static void afterBootstrapping(string $bootstrapper, Closure $callback)

No description

Parameters

string $bootstrapper
Closure $callback

Return Value

void

static bool hasBeenBootstrapped()

No description

Return Value

bool

static Application setBasePath(string $basePath)

No description

Parameters

string $basePath

Return Value

Application

static string path(string $path = '')

No description

Parameters

string $path

Return Value

string

static Application useAppPath(string $path)

No description

Parameters

string $path

Return Value

Application

static string basePath(string $path = '')

No description

Parameters

string $path

Return Value

string

static string bootstrapPath(string $path = '')

No description

Parameters

string $path

Return Value

string

static string configPath(string $path = '')

No description

Parameters

string $path

Return Value

string

static string databasePath(string $path = '')

No description

Parameters

string $path

Return Value

string

static Application useDatabasePath(string $path)

No description

Parameters

string $path

Return Value

Application

static string langPath(string $path = '')

No description

Parameters

string $path

Return Value

string

static Application useLangPath(string $path)

No description

Parameters

string $path

Return Value

Application

static string publicPath()

No description

Return Value

string

static string storagePath(string $path = '')

No description

Parameters

string $path

Return Value

string

static Application useStoragePath(string $path)

No description

Parameters

string $path

Return Value

Application

static string resourcePath(string $path = '')

No description

Parameters

string $path

Return Value

string

static string viewPath(string $path = '')

No description

Parameters

string $path

Return Value

string

static string environmentPath()

No description

Return Value

string

static Application useEnvironmentPath(string $path)

No description

Parameters

string $path

Return Value

Application

static Application loadEnvironmentFrom(string $file)

No description

Parameters

string $file

Return Value

Application

static string environmentFile()

No description

Return Value

string

static string environmentFilePath()

No description

Return Value

string

static string|bool environment(string|array $environments)

No description

Parameters

string|array $environments

Return Value

string|bool

static bool isLocal()

No description

Return Value

bool

static bool isProduction()

No description

Return Value

bool

static string detectEnvironment(Closure $callback)

No description

Parameters

Closure $callback

Return Value

string

static bool runningInConsole()

No description

Return Value

bool

static bool runningUnitTests()

No description

Return Value

bool

static bool hasDebugModeEnabled()

No description

Return Value

bool

static void registerConfiguredProviders()

No description

Return Value

void

static ServiceProvider register(ServiceProvider|string $provider, bool $force = false)

No description

Parameters

ServiceProvider|string $provider
bool $force

Return Value

ServiceProvider

static ServiceProvider|null getProvider(ServiceProvider|string $provider)

No description

Parameters

ServiceProvider|string $provider

Return Value

ServiceProvider|null

static array getProviders(ServiceProvider|string $provider)

No description

Parameters

ServiceProvider|string $provider

Return Value

array

static ServiceProvider resolveProvider(string $provider)

No description

Parameters

string $provider

Return Value

ServiceProvider

static void loadDeferredProviders()

No description

Return Value

void

static void loadDeferredProvider(string $service)

No description

Parameters

string $service

Return Value

void

static void registerDeferredProvider(string $provider, string|null $service = null)

No description

Parameters

string $provider
string|null $service

Return Value

void

static mixed make(string $abstract, array $parameters = [])

No description

Parameters

string $abstract
array $parameters

Return Value

mixed

static bool bound(string $abstract)

No description

Parameters

string $abstract

Return Value

bool

static bool isBooted()

No description

Return Value

bool

static void boot()

No description

Return Value

void

static void booting(callable $callback)

No description

Parameters

callable $callback

Return Value

void

static void booted(callable $callback)

No description

Parameters

callable $callback

Return Value

void

static Response handle(Request $request, int $type = 1, bool $catch = true)

No description

Parameters

Request $request
int $type
bool $catch

Return Value

Response

static bool shouldSkipMiddleware()

No description

Return Value

bool

static string getCachedServicesPath()

No description

Return Value

string

static string getCachedPackagesPath()

No description

Return Value

string

static bool configurationIsCached()

No description

Return Value

bool

static string getCachedConfigPath()

No description

Return Value

string

static bool routesAreCached()

No description

Return Value

bool

static string getCachedRoutesPath()

No description

Return Value

string

static bool eventsAreCached()

No description

Return Value

bool

static string getCachedEventsPath()

No description

Return Value

string

static Application addAbsoluteCachePathPrefix(string $prefix)

No description

Parameters

string $prefix

Return Value

Application

static MaintenanceMode maintenanceMode()

No description

Return Value

MaintenanceMode

static bool isDownForMaintenance()

No description

Return Value

bool

static never abort(int $code, string $message = '', array $headers = [])

No description

Parameters

int $code
string $message
array $headers

Return Value

never

static Application terminating(callable|string $callback)

No description

Parameters

callable|string $callback

Return Value

Application

static void terminate()

No description

Return Value

void

static array getLoadedProviders()

No description

Return Value

array

static bool providerIsLoaded(string $provider)

No description

Parameters

string $provider

Return Value

bool

static array getDeferredServices()

No description

Return Value

array

static void setDeferredServices(array $services)

No description

Parameters

array $services

Return Value

void

static void addDeferredServices(array $services)

No description

Parameters

array $services

Return Value

void

static bool isDeferredService(string $service)

No description

Parameters

string $service

Return Value

bool

static void provideFacades(string $namespace)

No description

Parameters

string $namespace

Return Value

void

static string getLocale()

No description

Return Value

string

static string currentLocale()

No description

Return Value

string

static string getFallbackLocale()

No description

Return Value

string

static void setLocale(string $locale)

No description

Parameters

string $locale

Return Value

void

static void setFallbackLocale(string $fallbackLocale)

No description

Parameters

string $fallbackLocale

Return Value

void

static bool isLocale(string $locale)

No description

Parameters

string $locale

Return Value

bool

static void registerCoreContainerAliases()

No description

Return Value

void

static void flush()

No description

Return Value

void

static string getNamespace()

No description

Return Value

string

static ContextualBindingBuilder when(array|string $concrete)

No description

Parameters

array|string $concrete

Return Value

ContextualBindingBuilder

static bool has(string $id)

No description

Parameters

string $id

Return Value

bool

static bool isShared(string $abstract)

No description

Parameters

string $abstract

Return Value

bool

static bool isAlias(string $name)

No description

Parameters

string $name

Return Value

bool

static void bind(string $abstract, Closure|string|null $concrete = null, bool $shared = false)

No description

Parameters

string $abstract
Closure|string|null $concrete
bool $shared

Return Value

void

static bool hasMethodBinding(string $method)

No description

Parameters

string $method

Return Value

bool

static void bindMethod(array|string $method, Closure $callback)

No description

Parameters

array|string $method
Closure $callback

Return Value

void

static mixed callMethodBinding(string $method, mixed $instance)

No description

Parameters

string $method
mixed $instance

Return Value

mixed

static void addContextualBinding(string $concrete, string $abstract, Closure|string $implementation)

No description

Parameters

string $concrete
string $abstract
Closure|string $implementation

Return Value

void

static void bindIf(string $abstract, Closure|string|null $concrete = null, bool $shared = false)

No description

Parameters

string $abstract
Closure|string|null $concrete
bool $shared

Return Value

void

static void singleton(string $abstract, Closure|string|null $concrete = null)

No description

Parameters

string $abstract
Closure|string|null $concrete

Return Value

void

static void singletonIf(string $abstract, Closure|string|null $concrete = null)

No description

Parameters

string $abstract
Closure|string|null $concrete

Return Value

void

static void scoped(string $abstract, Closure|string|null $concrete = null)

No description

Parameters

string $abstract
Closure|string|null $concrete

Return Value

void

static void scopedIf(string $abstract, Closure|string|null $concrete = null)

No description

Parameters

string $abstract
Closure|string|null $concrete

Return Value

void

static void extend(string $abstract, Closure $closure)

No description

Parameters

string $abstract
Closure $closure

Return Value

void

static mixed instance(string $abstract, mixed $instance)

No description

Parameters

string $abstract
mixed $instance

Return Value

mixed

static void tag(array|string $abstracts, array|mixed $tags)

No description

Parameters

array|string $abstracts
array|mixed $tags

Return Value

void

static iterable tagged(string $tag)

No description

Parameters

string $tag

Return Value

iterable

static void alias(string $abstract, string $alias)

No description

Parameters

string $abstract
string $alias

Return Value

void

static mixed rebinding(string $abstract, Closure $callback)

No description

Parameters

string $abstract
Closure $callback

Return Value

mixed

static mixed refresh(string $abstract, mixed $target, string $method)

No description

Parameters

string $abstract
mixed $target
string $method

Return Value

mixed

static Closure wrap(Closure $callback, array $parameters = [])

No description

Parameters

Closure $callback
array $parameters

Return Value

Closure

static mixed call(callable|string $callback, array $parameters = [], string|null $defaultMethod = null)

No description

Parameters

callable|string $callback
array $parameters
string|null $defaultMethod

Return Value

mixed

static Closure factory(string $abstract)

No description

Parameters

string $abstract

Return Value

Closure

static mixed makeWith(string|callable $abstract, array $parameters = [])

No description

Parameters

string|callable $abstract
array $parameters

Return Value

mixed

static mixed get(string $id)

No description

Parameters

string $id

Return Value

mixed

static mixed build(Closure|string $concrete)

No description

Parameters

Closure|string $concrete

Return Value

mixed

static void beforeResolving(Closure|string $abstract, Closure|null $callback = null)

No description

Parameters

Closure|string $abstract
Closure|null $callback

Return Value

void

static void resolving(Closure|string $abstract, Closure|null $callback = null)

No description

Parameters

Closure|string $abstract
Closure|null $callback

Return Value

void

static void afterResolving(Closure|string $abstract, Closure|null $callback = null)

No description

Parameters

Closure|string $abstract
Closure|null $callback

Return Value

void

static array getBindings()

No description

Return Value

array

static string getAlias(string $abstract)

No description

Parameters

string $abstract

Return Value

string

static void forgetExtenders(string $abstract)

No description

Parameters

string $abstract

Return Value

void

static void forgetInstance(string $abstract)

No description

Parameters

string $abstract

Return Value

void

static void forgetInstances()

No description

Return Value

void

static void forgetScopedInstances()

No description

Return Value

void

static Application getInstance()

No description

Return Value

Application

static Application setInstance(Container|null $container = null)

No description

Parameters

Container|null $container

Return Value

Application

static void macro(string $name, object|callable $macro)

No description

Parameters

string $name
object|callable $macro

Return Value

void

static void mixin(object $mixin, bool $replace = true)

No description

Parameters

object $mixin
bool $replace

Return Value

void

static bool hasMacro(string $name)

No description

Parameters

string $name

Return Value

bool

static void flushMacros()

No description

Return Value

void