class Application

Constants

VERSION

The Flarum version.

Properties

protected Paths $paths The paths for the Flarum installation.
protected bool $booted Indicates if the application has "booted".
protected array $bootingCallbacks The array of booting callbacks.
protected array $bootedCallbacks The array of booted callbacks.
protected array $serviceProviders All of the registered service providers.
protected array $loadedProviders The names of the loaded service providers.

Methods

__construct(Container $container, Paths $paths)

Create a new Flarum application instance.

mixed
config(string $key, mixed $default = null)

No description

bool
inDebugMode()

Check if Flarum is in debug mode.

string
url(string $path = null)

Get the URL to the Flarum installation.

registerBaseBindings()

Register the basic bindings into the container.

registerBaseServiceProviders()

Register all of the base service providers.

string
basePath() deprecated

Get the base path of the Laravel installation.

string
publicPath() deprecated

Get the path to the public / web directory.

string
storagePath() deprecated

Get the path to the storage directory.

string
vendorPath() deprecated

Get the path to the vendor directory where dependencies are installed.

ServiceProvider
register(ServiceProvider|string $provider, array $options = [], bool $force = false)

Register a service provider with the application.

ServiceProvider|null
getProvider(ServiceProvider|string $provider)

Get the registered service provider instance if it exists.

ServiceProvider
resolveProviderClass(string $provider)

Resolve a service provider instance from the class name.

void
markAsRegistered(ServiceProvider $provider)

Mark the given provider as registered.

bool
isBooted()

Determine if the application has booted.

void
boot()

Boot the application's service providers.

mixed
bootProvider(ServiceProvider $provider)

Boot the given service provider.

void
booting(mixed $callback)

Register a new boot listener.

void
booted(mixed $callback)

Register a new "booted" listener.

void
fireAppCallbacks(array $callbacks)

Call the booting callbacks for the application.

registerCoreContainerAliases()

Register the core class aliases in the container.

Details

__construct(Container $container, Paths $paths)

Create a new Flarum application instance.

Parameters

Container $container
Paths $paths

mixed config(string $key, mixed $default = null)

Parameters

string $key
mixed $default

Return Value

mixed

bool inDebugMode()

Check if Flarum is in debug mode.

Return Value

bool

string url(string $path = null)

Get the URL to the Flarum installation.

Parameters

string $path

Return Value

string

protected registerBaseBindings()

Register the basic bindings into the container.

protected registerBaseServiceProviders()

Register all of the base service providers.

string basePath() deprecated

deprecated Will be removed in Beta.15.

Get the base path of the Laravel installation.

Return Value

string

string publicPath() deprecated

deprecated Will be removed in Beta.15.

Get the path to the public / web directory.

Return Value

string

string storagePath() deprecated

deprecated Will be removed in Beta.15.

Get the path to the storage directory.

Return Value

string

string vendorPath() deprecated

deprecated Will be removed in Beta.15.

Get the path to the vendor directory where dependencies are installed.

Return Value

string

ServiceProvider register(ServiceProvider|string $provider, array $options = [], bool $force = false)

Register a service provider with the application.

Parameters

ServiceProvider|string $provider
array $options
bool $force

Return Value

ServiceProvider

ServiceProvider|null getProvider(ServiceProvider|string $provider)

Get the registered service provider instance if it exists.

Parameters

ServiceProvider|string $provider

Return Value

ServiceProvider|null

ServiceProvider resolveProviderClass(string $provider)

Resolve a service provider instance from the class name.

Parameters

string $provider

Return Value

ServiceProvider

protected void markAsRegistered(ServiceProvider $provider)

Mark the given provider as registered.

Parameters

ServiceProvider $provider

Return Value

void

bool isBooted()

Determine if the application has booted.

Return Value

bool

void boot()

Boot the application's service providers.

Return Value

void

protected mixed bootProvider(ServiceProvider $provider)

Boot the given service provider.

Parameters

ServiceProvider $provider

Return Value

mixed

void booting(mixed $callback)

Register a new boot listener.

Parameters

mixed $callback

Return Value

void

void booted(mixed $callback)

Register a new "booted" listener.

Parameters

mixed $callback

Return Value

void

protected void fireAppCallbacks(array $callbacks)

Call the booting callbacks for the application.

Parameters

array $callbacks

Return Value

void

registerCoreContainerAliases()

Register the core class aliases in the container.