PHP Class Flarum\Foundation\Application

Inheritance: extends Illuminate\Container\Container, implements Illuminate\Contracts\Foundation\Application
Afficher le fichier Open project: flarum/core Class Usage Examples

Protected Properties

Свойство Type Description
$basePath string The base path for the Flarum installation.
$booted boolean Indicates if the application has "booted".
$bootedCallbacks array The array of booted callbacks.
$bootingCallbacks array The array of booting callbacks.
$deferredServices array The deferred services and their providers.
$loadedProviders array The names of the loaded service providers.
$publicPath string The public path for the Flarum installation.
$serviceProviders array All of the registered service providers.
$storagePath string The custom storage path defined by the developer.

Méthodes publiques

Méthode Description
__construct ( string | null $basePath = null, string | null $publicPath = null ) Create a new Flarum application instance.
addDeferredServices ( array $services ) : void Add an array of services to the application's deferred services.
basePath ( ) : string Get the base path of the Laravel installation.
boot ( ) : void Boot the application's service providers.
booted ( mixed $callback ) : void Register a new "booted" listener.
booting ( mixed $callback ) : void Register a new boot listener.
bound ( string $abstract ) : boolean Determine if the given abstract type has been bound.
config ( string $key, mixed $default = null ) : mixed
environment ( ) : string Get or check the current application environment.
flush ( ) Flush the container of all bindings and resolved instances.
getCachedCompilePath ( ) : string Get the path to the cached "compiled.php" file.
getCachedServicesPath ( ) : string Get the path to the cached services.json file.
getDeferredServices ( ) : array Get the application's deferred services.
getLoadedProviders ( ) : array Get the service providers that have been loaded.
getProvider ( ServiceProvider | string $provider ) : ServiceProvider | null Get the registered service provider instance if it exists.
inDebugMode ( ) : boolean Check if Flarum is in debug mode.
isBooted ( ) : boolean Determine if the application has booted.
isDeferredService ( string $service ) : boolean Determine if the given service is a deferred service.
isDownForMaintenance ( ) : boolean Determine if the application is currently down for maintenance.
isInstalled ( ) : boolean Determine if Flarum has been installed.
isUpToDate ( )
loadDeferredProvider ( string $service ) Load the provider for a deferred service.
loadDeferredProviders ( ) Load and boot all of the remaining deferred providers.
make ( string $abstract, array $parameters = [] ) : mixed Resolve the given type from the container.
publicPath ( ) : string Get the path to the public / web directory.
register ( ServiceProvider | string $provider, array $options = [], boolean $force = false ) : ServiceProvider Register a service provider with the application.
registerConfiguredProviders ( ) : void Register all of the configured providers.
registerCoreContainerAliases ( ) Register the core class aliases in the container.
registerDeferredProvider ( string $provider, string $service = null ) Register a deferred provider and service.
resolveProviderClass ( string $provider ) : ServiceProvider Resolve a service provider instance from the class name.
runningInConsole ( ) : boolean Determine if we are running in the console.
runningUnitTests ( ) : boolean Determine if we are running unit tests.
setBasePath ( string $basePath ) Set the base path for the application.
setDeferredServices ( array $services ) : void Set the application's deferred services.
setPublicPath ( string $publicPath ) Set the public path for the application.
storagePath ( ) : string Get the path to the storage directory.
url ( string $path = null ) : string Get the URL to the Flarum installation.
useStoragePath ( string $path ) Set the storage directory.
version ( ) : string Get the version number of the application.

Méthodes protégées

Méthode Description
bindPathsInContainer ( ) : void Bind all of the application paths in the container.
bootProvider ( ServiceProvider $provider ) : mixed Boot the given service provider.
fireAppCallbacks ( array $callbacks ) : void Call the booting callbacks for the application.
markAsRegistered ( ServiceProvider $provider ) : void Mark the given provider as registered.
registerBaseBindings ( ) Register the basic bindings into the container.
registerBaseServiceProviders ( ) Register all of the base service providers.

Method Details

__construct() public méthode

Create a new Flarum application instance.
public __construct ( string | null $basePath = null, string | null $publicPath = null )
$basePath string | null
$publicPath string | null

addDeferredServices() public méthode

Add an array of services to the application's deferred services.
public addDeferredServices ( array $services ) : void
$services array
Résultat void

basePath() public méthode

Get the base path of the Laravel installation.
public basePath ( ) : string
Résultat string

bindPathsInContainer() protected méthode

Bind all of the application paths in the container.
protected bindPathsInContainer ( ) : void
Résultat void

boot() public méthode

Boot the application's service providers.
public boot ( ) : void
Résultat void

bootProvider() protected méthode

Boot the given service provider.
protected bootProvider ( ServiceProvider $provider ) : mixed
$provider Illuminate\Support\ServiceProvider
Résultat mixed

booted() public méthode

Register a new "booted" listener.
public booted ( mixed $callback ) : void
$callback mixed
Résultat void

booting() public méthode

Register a new boot listener.
public booting ( mixed $callback ) : void
$callback mixed
Résultat void

bound() public méthode

(Overriding Container::bound)
public bound ( string $abstract ) : boolean
$abstract string
Résultat boolean

config() public méthode

public config ( string $key, mixed $default = null ) : mixed
$key string
$default mixed
Résultat mixed

environment() public méthode

Get or check the current application environment.
public environment ( ) : string
Résultat string

fireAppCallbacks() protected méthode

Call the booting callbacks for the application.
protected fireAppCallbacks ( array $callbacks ) : void
$callbacks array
Résultat void

flush() public méthode

Flush the container of all bindings and resolved instances.
public flush ( )

getCachedCompilePath() public méthode

Get the path to the cached "compiled.php" file.
public getCachedCompilePath ( ) : string
Résultat string

getCachedServicesPath() public méthode

Get the path to the cached services.json file.
public getCachedServicesPath ( ) : string
Résultat string

getDeferredServices() public méthode

Get the application's deferred services.
public getDeferredServices ( ) : array
Résultat array

getLoadedProviders() public méthode

Get the service providers that have been loaded.
public getLoadedProviders ( ) : array
Résultat array

getProvider() public méthode

Get the registered service provider instance if it exists.
public getProvider ( ServiceProvider | string $provider ) : ServiceProvider | null
$provider Illuminate\Support\ServiceProvider | string
Résultat Illuminate\Support\ServiceProvider | null

inDebugMode() public méthode

Check if Flarum is in debug mode.
public inDebugMode ( ) : boolean
Résultat boolean

isBooted() public méthode

Determine if the application has booted.
public isBooted ( ) : boolean
Résultat boolean

isDeferredService() public méthode

Determine if the given service is a deferred service.
public isDeferredService ( string $service ) : boolean
$service string
Résultat boolean

isDownForMaintenance() public méthode

Determine if the application is currently down for maintenance.
public isDownForMaintenance ( ) : boolean
Résultat boolean

isInstalled() public méthode

Determine if Flarum has been installed.
public isInstalled ( ) : boolean
Résultat boolean

isUpToDate() public méthode

public isUpToDate ( )

loadDeferredProvider() public méthode

Load the provider for a deferred service.
public loadDeferredProvider ( string $service )
$service string

loadDeferredProviders() public méthode

Load and boot all of the remaining deferred providers.

make() public méthode

(Overriding Container::make)
public make ( string $abstract, array $parameters = [] ) : mixed
$abstract string
$parameters array
Résultat mixed

markAsRegistered() protected méthode

Mark the given provider as registered.
protected markAsRegistered ( ServiceProvider $provider ) : void
$provider Illuminate\Support\ServiceProvider
Résultat void

publicPath() public méthode

Get the path to the public / web directory.
public publicPath ( ) : string
Résultat string

register() public méthode

Register a service provider with the application.
public register ( ServiceProvider | string $provider, array $options = [], boolean $force = false ) : ServiceProvider
$provider Illuminate\Support\ServiceProvider | string
$options array
$force boolean
Résultat Illuminate\Support\ServiceProvider

registerBaseBindings() protected méthode

Register the basic bindings into the container.
protected registerBaseBindings ( )

registerBaseServiceProviders() protected méthode

Register all of the base service providers.

registerConfiguredProviders() public méthode

Register all of the configured providers.
public registerConfiguredProviders ( ) : void
Résultat void

registerCoreContainerAliases() public méthode

Register the core class aliases in the container.

registerDeferredProvider() public méthode

Register a deferred provider and service.
public registerDeferredProvider ( string $provider, string $service = null )
$provider string
$service string

resolveProviderClass() public méthode

Resolve a service provider instance from the class name.
public resolveProviderClass ( string $provider ) : ServiceProvider
$provider string
Résultat Illuminate\Support\ServiceProvider

runningInConsole() public méthode

Determine if we are running in the console.
public runningInConsole ( ) : boolean
Résultat boolean

runningUnitTests() public méthode

Determine if we are running unit tests.
public runningUnitTests ( ) : boolean
Résultat boolean

setBasePath() public méthode

Set the base path for the application.
public setBasePath ( string $basePath )
$basePath string

setDeferredServices() public méthode

Set the application's deferred services.
public setDeferredServices ( array $services ) : void
$services array
Résultat void

setPublicPath() public méthode

Set the public path for the application.
public setPublicPath ( string $publicPath )
$publicPath string

storagePath() public méthode

Get the path to the storage directory.
public storagePath ( ) : string
Résultat string

url() public méthode

Get the URL to the Flarum installation.
public url ( string $path = null ) : string
$path string
Résultat string

useStoragePath() public méthode

Set the storage directory.
public useStoragePath ( string $path )
$path string

version() public méthode

Get the version number of the application.
public version ( ) : string
Résultat string

Property Details

$basePath protected_oe property

The base path for the Flarum installation.
protected string $basePath
Résultat string

$booted protected_oe property

Indicates if the application has "booted".
protected bool $booted
Résultat boolean

$bootedCallbacks protected_oe property

The array of booted callbacks.
protected array $bootedCallbacks
Résultat array

$bootingCallbacks protected_oe property

The array of booting callbacks.
protected array $bootingCallbacks
Résultat array

$deferredServices protected_oe property

The deferred services and their providers.
protected array $deferredServices
Résultat array

$loadedProviders protected_oe property

The names of the loaded service providers.
protected array $loadedProviders
Résultat array

$publicPath protected_oe property

The public path for the Flarum installation.
protected string $publicPath
Résultat string

$serviceProviders protected_oe property

All of the registered service providers.
protected array $serviceProviders
Résultat array

$storagePath protected_oe property

The custom storage path defined by the developer.
protected string $storagePath
Résultat string