class Application

Constants

VERSION

<p>The Flarum version.</p>

Properties

protected Paths $paths <p>The paths for the Flarum installation.</p>
protected bool $booted <p>Indicates if the application has &quot;booted&quot;.</p>
protected array $bootingCallbacks <p>The array of booting callbacks.</p>
protected array $bootedCallbacks <p>The array of booted callbacks.</p>
protected array $serviceProviders <p>All of the registered service providers.</p>
protected array $loadedProviders <p>The names of the loaded service providers.</p>

Methods

__construct(Container $container, Paths $paths)

<p>Create a new Flarum application instance.</p>

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

No description

bool
inDebugMode()

<p>Check if Flarum is in debug mode.</p>

string
url(string $path = null)

<p>Get the URL to the Flarum installation.</p>

registerBaseBindings()

<p>Register the basic bindings into the container.</p>

registerBaseServiceProviders()

<p>Register all of the base service providers.</p>

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

<p>Register a service provider with the application.</p>

ServiceProvider|null
getProvider(ServiceProvider|string $provider)

<p>Get the registered service provider instance if it exists.</p>

ServiceProvider
resolveProviderClass(string $provider)

<p>Resolve a service provider instance from the class name.</p>

void
markAsRegistered(ServiceProvider $provider)

<p>Mark the given provider as registered.</p>

bool
isBooted()

<p>Determine if the application has booted.</p>

void
boot()

<p>Boot the application's service providers.</p>

mixed
bootProvider(ServiceProvider $provider)

<p>Boot the given service provider.</p>

void
booting(mixed $callback)

<p>Register a new boot listener.</p>

void
booted(mixed $callback)

<p>Register a new &quot;booted&quot; listener.</p>

void
fireAppCallbacks(array $callbacks)

<p>Call the booting callbacks for the application.</p>

registerCoreContainerAliases()

<p>Register the core class aliases in the container.</p>

Details

__construct(Container $container, Paths $paths)

<p>Create a new Flarum application instance.</p>

Parameters

Container $container
Paths $paths

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

Parameters

string $key
mixed $default

Return Value

mixed

bool inDebugMode()

<p>Check if Flarum is in debug mode.</p>

Return Value

bool

string url(string $path = null)

<p>Get the URL to the Flarum installation.</p>

Parameters

string $path

Return Value

string

protected registerBaseBindings()

<p>Register the basic bindings into the container.</p>

protected registerBaseServiceProviders()

<p>Register all of the base service providers.</p>

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

<p>Register a service provider with the application.</p>

Parameters

ServiceProvider|string $provider
array $options
bool $force

Return Value

ServiceProvider

ServiceProvider|null getProvider(ServiceProvider|string $provider)

<p>Get the registered service provider instance if it exists.</p>

Parameters

ServiceProvider|string $provider

Return Value

ServiceProvider|null

ServiceProvider resolveProviderClass(string $provider)

<p>Resolve a service provider instance from the class name.</p>

Parameters

string $provider

Return Value

ServiceProvider

protected void markAsRegistered(ServiceProvider $provider)

<p>Mark the given provider as registered.</p>

Parameters

ServiceProvider $provider

Return Value

void

bool isBooted()

<p>Determine if the application has booted.</p>

Return Value

bool

void boot()

<p>Boot the application's service providers.</p>

Return Value

void

protected mixed bootProvider(ServiceProvider $provider)

<p>Boot the given service provider.</p>

Parameters

ServiceProvider $provider

Return Value

mixed

void booting(mixed $callback)

<p>Register a new boot listener.</p>

Parameters

mixed $callback

Return Value

void

void booted(mixed $callback)

<p>Register a new &quot;booted&quot; listener.</p>

Parameters

mixed $callback

Return Value

void

protected void fireAppCallbacks(array $callbacks)

<p>Call the booting callbacks for the application.</p>

Parameters

array $callbacks

Return Value

void

registerCoreContainerAliases()

<p>Register the core class aliases in the container.</p>