class Application extends Container implements Application
Constants
VERSION |
The Flarum version. |
Properties
Methods
Create a new Flarum application instance.
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.
Register a deferred provider and service.
Add an array of services to the application's deferred services.
Details
at
line 104
__construct(string|null $basePath = null, string|null $publicPath = null)
Create a new Flarum application instance.
at
line 126
mixed
config(string $key, mixed $default = null)
at
line 136
bool
inDebugMode()
Check if Flarum is in debug mode.
at
line 147
string
url(string $path = null)
Get the URL to the Flarum installation.
at
line 172
string
version()
Get the version number of the application.
at
line 180
protected
registerBaseBindings()
Register the basic bindings into the container.
at
line 192
protected
registerBaseServiceProviders()
Register all of the base service providers.
at
line 203
$this
setBasePath(string $basePath)
Set the base path for the application.
at
line 218
$this
setPublicPath(string $publicPath)
Set the public path for the application.
at
line 232
protected void
bindPathsInContainer()
Bind all of the application paths in the container.
at
line 244
string
basePath()
Get the base path of the Laravel installation.
at
line 254
string
publicPath()
Get the path to the public / web directory.
at
line 264
string
storagePath()
Get the path to the storage directory.
at
line 274
string
vendorPath()
Get the path to the vendor directory where dependencies are installed.
at
line 285
$this
useStoragePath(string $path)
Set the storage directory.
at
line 300
$this
useVendorPath(string $path)
Set the vendor directory.
at
line 315
string
environment()
Get or check the current application environment.
at
line 337
bool
runningInConsole()
Determine if we are running in the console.
at
line 347
bool
runningUnitTests()
Determine if we are running unit tests.
at
line 357
void
registerConfiguredProviders()
Register all of the configured providers.
at
line 369
ServiceProvider
register(ServiceProvider|string $provider, array $options = [], bool $force = false)
Register a service provider with the application.
at
line 409
ServiceProvider|null
getProvider(ServiceProvider|string $provider)
Get the registered service provider instance if it exists.
at
line 424
ServiceProvider
resolveProviderClass(string $provider)
Resolve a service provider instance from the class name.
at
line 435
protected void
markAsRegistered(ServiceProvider $provider)
Mark the given provider as registered.
at
line 447
loadDeferredProviders()
Load and boot all of the remaining deferred providers.
at
line 464
loadDeferredProvider(string $service)
Load the provider for a deferred service.
at
line 486
registerDeferredProvider(string $provider, string $service = null)
Register a deferred provider and service.
at
line 513
mixed
make(string $abstract, array $parameters = [])
Resolve the given type from the container.
(Overriding Container::make)
at
line 532
bool
bound(string $abstract)
Determine if the given abstract type has been bound.
(Overriding Container::bound)
at
line 542
bool
isBooted()
Determine if the application has booted.
at
line 552
void
boot()
Boot the application's service providers.
at
line 578
protected mixed
bootProvider(ServiceProvider $provider)
Boot the given service provider.
at
line 591
void
booting(mixed $callback)
Register a new boot listener.
at
line 602
void
booted(mixed $callback)
Register a new "booted" listener.
at
line 617
protected void
fireAppCallbacks(array $callbacks)
Call the booting callbacks for the application.
at
line 629
string
getCachedCompilePath()
Get the path to the cached "compiled.php" file.
at
line 639
string
getCachedServicesPath()
Get the path to the cached services.json file.
at
line 649
bool
isDownForMaintenance()
Determine if the application is currently down for maintenance.
at
line 659
array
getLoadedProviders()
Get the service providers that have been loaded.
at
line 669
array
getDeferredServices()
Get the application's deferred services.
at
line 680
void
setDeferredServices(array $services)
Set the application's deferred services.
at
line 691
void
addDeferredServices(array $services)
Add an array of services to the application's deferred services.
at
line 702
bool
isDeferredService(string $service)
Determine if the given service is a deferred service.
at
line 710
registerCoreContainerAliases()
Register the core class aliases in the container.
at
line 741
flush()
Flush the container of all bindings and resolved instances.
at
line 753
string
getCachedPackagesPath()
Get the path to the cached packages.php file.