PHP Class Laravel\Lumen\Application

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

Méthodes publiques

Свойство Type Description
$availableBindings array The available container bindings and their respective load methods.

Protected Properties

Свойство 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.

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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 méthode

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

basePath() public méthode

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

bootstrapContainer() protected méthode

Bootstrap the application container.
protected bootstrapContainer ( ) : void
Résultat void

configure() public méthode

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

configureMonologUsing() public méthode

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

databasePath() public méthode

Get the database path for the application.
public databasePath ( ) : string
Résultat string

environment() public méthode

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

getConfigurationPath() public méthode

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
Résultat string

getLanguagePath() protected méthode

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

getMonologHandler() protected méthode

Get the Monolog handler for the application.
protected getMonologHandler ( ) : AbstractHandler
Résultat Monolog\Handler\AbstractHandler

getNamespace() public méthode

Get the application namespace.
public getNamespace ( ) : string
Résultat string

isDownForMaintenance() public méthode

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

loadComponent() public méthode

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
Résultat mixed

make() public méthode

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

path() public méthode

Get the path to the application "app" directory.
public path ( ) : string
Résultat string

prepareForConsoleCommand() public méthode

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

prepareRequest() protected méthode

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

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

registerAuthBindings() protected méthode

Register container bindings for the application.
protected registerAuthBindings ( ) : void
Résultat void

registerBroadcastingBindings() protected méthode

Register container bindings for the application.
protected registerBroadcastingBindings ( ) : void
Résultat void

registerBusBindings() protected méthode

Register container bindings for the application.
protected registerBusBindings ( ) : void
Résultat void

registerCacheBindings() protected méthode

Register container bindings for the application.
protected registerCacheBindings ( ) : void
Résultat void

registerComposerBindings() protected méthode

Register container bindings for the application.
protected registerComposerBindings ( ) : void
Résultat void

registerConfigBindings() protected méthode

Register container bindings for the application.
protected registerConfigBindings ( ) : void
Résultat void

registerContainerAliases() protected méthode

Register the core container aliases.
protected registerContainerAliases ( ) : void
Résultat void

registerDatabaseBindings() protected méthode

Register container bindings for the application.
protected registerDatabaseBindings ( ) : void
Résultat void

registerDeferredProvider() public méthode

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

registerEncrypterBindings() protected méthode

Register container bindings for the application.
protected registerEncrypterBindings ( ) : void
Résultat void

registerEventBindings() protected méthode

Register container bindings for the application.
protected registerEventBindings ( ) : void
Résultat void

registerFilesBindings() protected méthode

Register container bindings for the application.
protected registerFilesBindings ( ) : void
Résultat void

registerHashBindings() protected méthode

Register container bindings for the application.
protected registerHashBindings ( ) : void
Résultat void

registerLogBindings() protected méthode

Register container bindings for the application.
protected registerLogBindings ( ) : void
Résultat void

registerPsrRequestBindings() protected méthode

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

registerPsrResponseBindings() protected méthode

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

registerQueueBindings() protected méthode

Register container bindings for the application.
protected registerQueueBindings ( ) : void
Résultat void

registerRequestBindings() protected méthode

Register container bindings for the application.
protected registerRequestBindings ( ) : void
Résultat void

registerTranslationBindings() protected méthode

Register container bindings for the application.
protected registerTranslationBindings ( ) : void
Résultat void

registerUrlGeneratorBindings() protected méthode

Register container bindings for the application.
protected registerUrlGeneratorBindings ( ) : void
Résultat void

registerValidatorBindings() protected méthode

Register container bindings for the application.
protected registerValidatorBindings ( ) : void
Résultat void

registerViewBindings() protected méthode

Register container bindings for the application.
protected registerViewBindings ( ) : void
Résultat void

runningInConsole() public méthode

Determine if the application is 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

storagePath() public méthode

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

version() public méthode

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

withAliases() public méthode

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

withEloquent() public méthode

Load the Eloquent library for the application.
public withEloquent ( ) : void
Résultat void

withFacades() public méthode

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

Property Details

$aliasesRegistered protected_oe static_oe property

Indicates if the class aliases have been registered.
protected static bool $aliasesRegistered
Résultat boolean

$availableBindings public_oe property

The available container bindings and their respective load methods.
public array $availableBindings
Résultat array

$basePath protected_oe property

The base path of the application installation.
protected string $basePath
Résultat string

$loadedConfigurations protected_oe property

All of the loaded configuration files.
protected array $loadedConfigurations
Résultat array

$loadedProviders protected_oe property

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

$monologConfigurator protected_oe property

A custom callback used to configure Monolog.
protected callable|null $monologConfigurator
Résultat callable | null

$namespace protected_oe property

The application namespace.
protected string $namespace
Résultat string

$ranServiceBinders protected_oe property

The service binding methods that have been executed.
protected array $ranServiceBinders
Résultat array