PHP Class Laravel\Lumen\Application

Inheritance: extends Illuminate\Container\Container, use trait Laravel\Lumen\Concerns\RoutesRequests, use trait Laravel\Lumen\Concerns\RegistersExceptionHandlers
Show file Open project: laravel/lumen-framework Class Usage Examples

Public Properties

Property Type Description
$availableBindings array The available container bindings and their respective load methods.

Protected Properties

Property Type Description
$aliasesRegistered boolean Indicates if the class aliases have been registered.
$basePath string The base path of the application installation.
$loadedConfigurations array All of the loaded configuration files.
$loadedProviders array The loaded service providers.
$monologConfigurator callable | null A custom callback used to configure Monolog.
$namespace string The application namespace.
$ranServiceBinders array The service binding methods that have been executed.

Public Methods

Method Description
__construct ( string | null $basePath = null ) : void Create a new Lumen application instance.
basePath ( string | null $path = null ) : string Get the base path for the application.
configure ( string $name ) : void Load a configuration file into the application.
configureMonologUsing ( callable $callback ) Define a callback to be used to configure Monolog.
databasePath ( ) : string Get the database path for the application.
environment ( ) : string Get or check the current application environment.
getConfigurationPath ( string | null $name = null ) : string Get the path to the given configuration file.
getNamespace ( ) : string Get the application namespace.
isDownForMaintenance ( ) : boolean Determine if the application is currently down for maintenance.
loadComponent ( string $config, array | string $providers, string | null $return = null ) : mixed Configure and load the given component and provider.
make ( string $abstract, array $parameters = [] ) : mixed Resolve the given type from the container.
path ( ) : string Get the path to the application "app" directory.
prepareForConsoleCommand ( boolean $aliases = true ) : void Prepare the application to execute a console command.
register ( ServiceProvider | string $provider, array $options = [], boolean $force = false ) : ServiceProvider Register a service provider with the application.
registerDeferredProvider ( string $provider, string | null $service = null ) : void Register a deferred provider and service.
runningInConsole ( ) : boolean Determine if the application is running in the console.
runningUnitTests ( ) : boolean Determine if we are running unit tests.
storagePath ( string | null $path = null ) : string Get the storage path for the application.
version ( ) : string Get the version number of the application.
withAliases ( array $userAliases = [] ) : void Register the aliases for the application.
withEloquent ( ) : void Load the Eloquent library for the application.
withFacades ( boolean $aliases = true, array $userAliases = [] ) : void Register the facades for the application.

Protected Methods

Method Description
bootstrapContainer ( ) : void Bootstrap the application container.
getLanguagePath ( ) : string Get the path to the application's language files.
getMonologHandler ( ) : AbstractHandler Get the Monolog handler for the application.
prepareRequest ( Illuminate\Http\Request $request ) : Illuminate\Http\Request Prepare the given request instance for use with the application.
registerAuthBindings ( ) : void Register container bindings for the application.
registerBroadcastingBindings ( ) : void Register container bindings for the application.
registerBusBindings ( ) : void Register container bindings for the application.
registerCacheBindings ( ) : void Register container bindings for the application.
registerComposerBindings ( ) : void Register container bindings for the application.
registerConfigBindings ( ) : void Register container bindings for the application.
registerContainerAliases ( ) : void Register the core container aliases.
registerDatabaseBindings ( ) : void Register container bindings for the application.
registerEncrypterBindings ( ) : void Register container bindings for the application.
registerEventBindings ( ) : void Register container bindings for the application.
registerFilesBindings ( ) : void Register container bindings for the application.
registerHashBindings ( ) : void Register container bindings for the application.
registerLogBindings ( ) : void Register container bindings for the application.
registerPsrRequestBindings ( ) : void Register container bindings for the PSR-7 request implementation.
registerPsrResponseBindings ( ) : void Register container bindings for the PSR-7 response implementation.
registerQueueBindings ( ) : void Register container bindings for the application.
registerRequestBindings ( ) : void Register container bindings for the application.
registerTranslationBindings ( ) : void Register container bindings for the application.
registerUrlGeneratorBindings ( ) : void Register container bindings for the application.
registerValidatorBindings ( ) : void Register container bindings for the application.
registerViewBindings ( ) : void Register container bindings for the application.

Method Details

__construct() public method

Create a new Lumen application instance.
public __construct ( string | null $basePath = null ) : void
$basePath string | null
return void

basePath() public method

Get the base path for the application.
public basePath ( string | null $path = null ) : string
$path string | null
return string

bootstrapContainer() protected method

Bootstrap the application container.
protected bootstrapContainer ( ) : void
return void

configure() public method

Load a configuration file into the application.
public configure ( string $name ) : void
$name string
return void

configureMonologUsing() public method

Define a callback to be used to configure Monolog.
public configureMonologUsing ( callable $callback )
$callback callable

databasePath() public method

Get the database path for the application.
public databasePath ( ) : string
return string

environment() public method

Get or check the current application environment.
public environment ( ) : string
return string

getConfigurationPath() public method

If no name is provided, then we'll return the path to the config folder.
public getConfigurationPath ( string | null $name = null ) : string
$name string | null
return string

getLanguagePath() protected method

Get the path to the application's language files.
protected getLanguagePath ( ) : string
return string

getMonologHandler() protected method

Get the Monolog handler for the application.
protected getMonologHandler ( ) : AbstractHandler
return Monolog\Handler\AbstractHandler

getNamespace() public method

Get the application namespace.
public getNamespace ( ) : string
return string

isDownForMaintenance() public method

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

loadComponent() public method

Configure and load the given component and provider.
public loadComponent ( string $config, array | string $providers, string | null $return = null ) : mixed
$config string
$providers array | string
$return string | null
return mixed

make() public method

Resolve the given type from the container.
public make ( string $abstract, array $parameters = [] ) : mixed
$abstract string
$parameters array
return mixed

path() public method

Get the path to the application "app" directory.
public path ( ) : string
return string

prepareForConsoleCommand() public method

Prepare the application to execute a console command.
public prepareForConsoleCommand ( boolean $aliases = true ) : void
$aliases boolean
return void

prepareRequest() protected method

Prepare the given request instance for use with the application.
protected prepareRequest ( Illuminate\Http\Request $request ) : Illuminate\Http\Request
$request Illuminate\Http\Request
return Illuminate\Http\Request

register() public method

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
return Illuminate\Support\ServiceProvider

registerAuthBindings() protected method

Register container bindings for the application.
protected registerAuthBindings ( ) : void
return void

registerBroadcastingBindings() protected method

Register container bindings for the application.
protected registerBroadcastingBindings ( ) : void
return void

registerBusBindings() protected method

Register container bindings for the application.
protected registerBusBindings ( ) : void
return void

registerCacheBindings() protected method

Register container bindings for the application.
protected registerCacheBindings ( ) : void
return void

registerComposerBindings() protected method

Register container bindings for the application.
protected registerComposerBindings ( ) : void
return void

registerConfigBindings() protected method

Register container bindings for the application.
protected registerConfigBindings ( ) : void
return void

registerContainerAliases() protected method

Register the core container aliases.
protected registerContainerAliases ( ) : void
return void

registerDatabaseBindings() protected method

Register container bindings for the application.
protected registerDatabaseBindings ( ) : void
return void

registerDeferredProvider() public method

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

registerEncrypterBindings() protected method

Register container bindings for the application.
protected registerEncrypterBindings ( ) : void
return void

registerEventBindings() protected method

Register container bindings for the application.
protected registerEventBindings ( ) : void
return void

registerFilesBindings() protected method

Register container bindings for the application.
protected registerFilesBindings ( ) : void
return void

registerHashBindings() protected method

Register container bindings for the application.
protected registerHashBindings ( ) : void
return void

registerLogBindings() protected method

Register container bindings for the application.
protected registerLogBindings ( ) : void
return void

registerPsrRequestBindings() protected method

Register container bindings for the PSR-7 request implementation.
protected registerPsrRequestBindings ( ) : void
return void

registerPsrResponseBindings() protected method

Register container bindings for the PSR-7 response implementation.
protected registerPsrResponseBindings ( ) : void
return void

registerQueueBindings() protected method

Register container bindings for the application.
protected registerQueueBindings ( ) : void
return void

registerRequestBindings() protected method

Register container bindings for the application.
protected registerRequestBindings ( ) : void
return void

registerTranslationBindings() protected method

Register container bindings for the application.
protected registerTranslationBindings ( ) : void
return void

registerUrlGeneratorBindings() protected method

Register container bindings for the application.
protected registerUrlGeneratorBindings ( ) : void
return void

registerValidatorBindings() protected method

Register container bindings for the application.
protected registerValidatorBindings ( ) : void
return void

registerViewBindings() protected method

Register container bindings for the application.
protected registerViewBindings ( ) : void
return void

runningInConsole() public method

Determine if the application is running in the console.
public runningInConsole ( ) : boolean
return boolean

runningUnitTests() public method

Determine if we are running unit tests.
public runningUnitTests ( ) : boolean
return boolean

storagePath() public method

Get the storage path for the application.
public storagePath ( string | null $path = null ) : string
$path string | null
return string

version() public method

Get the version number of the application.
public version ( ) : string
return string

withAliases() public method

Register the aliases for the application.
public withAliases ( array $userAliases = [] ) : void
$userAliases array
return void

withEloquent() public method

Load the Eloquent library for the application.
public withEloquent ( ) : void
return void

withFacades() public method

Register the facades for the application.
public withFacades ( boolean $aliases = true, array $userAliases = [] ) : void
$aliases boolean
$userAliases array
return void

Property Details

$aliasesRegistered protected static property

Indicates if the class aliases have been registered.
protected static bool $aliasesRegistered
return boolean

$availableBindings public property

The available container bindings and their respective load methods.
public array $availableBindings
return array

$basePath protected property

The base path of the application installation.
protected string $basePath
return string

$loadedConfigurations protected property

All of the loaded configuration files.
protected array $loadedConfigurations
return array

$loadedProviders protected property

The loaded service providers.
protected array $loadedProviders
return array

$monologConfigurator protected property

A custom callback used to configure Monolog.
protected callable|null $monologConfigurator
return callable | null

$namespace protected property

The application namespace.
protected string $namespace
return string

$ranServiceBinders protected property

The service binding methods that have been executed.
protected array $ranServiceBinders
return array