PHP Class Illuminate\Support\ServiceProvider

Exibir arquivo Open project: illuminate/support Class Usage Examples

Protected Properties

Property Type Description
$app Illuminate\Contracts\Foundation\Application The application instance.
$defer boolean Indicates if loading of the provider is deferred.
$publishGroups array The paths that should be published by group.
$publishes array The paths that should be published.

Public Methods

Method Description
__construct ( Illuminate\Contracts\Foundation\Application $app ) : void Create a new service provider instance.
commands ( array | mixed $commands ) : void Register the package's custom Artisan commands.
compiles ( ) : array Get a list of files that should be compiled for the package.
isDeferred ( ) : boolean Determine if the provider is deferred.
pathsToPublish ( string $provider = null, string $group = null ) : array Get the paths to publish.
provides ( ) : array Get the services provided by the provider.
when ( ) : array Get the events that trigger this service provider to register.

Protected Methods

Method Description
loadMigrationsFrom ( array | string $paths ) : void Register a database migration path.
loadRoutesFrom ( string $path ) : void Load the given routes file if routes are not already cached.
loadTranslationsFrom ( string $path, string $namespace ) : void Register a translation file namespace.
loadViewsFrom ( string $path, string $namespace ) : void Register a view file namespace.
mergeConfigFrom ( string $path, string $key ) : void Merge the given configuration with the existing configuration.
publishes ( array $paths, string $group = null ) : void Register paths to be published by the publish command.

Method Details

__construct() public method

Create a new service provider instance.
public __construct ( Illuminate\Contracts\Foundation\Application $app ) : void
$app Illuminate\Contracts\Foundation\Application
return void

commands() public method

Register the package's custom Artisan commands.
public commands ( array | mixed $commands ) : void
$commands array | mixed
return void

compiles() public static method

Get a list of files that should be compiled for the package.
public static compiles ( ) : array
return array

isDeferred() public method

Determine if the provider is deferred.
public isDeferred ( ) : boolean
return boolean

loadMigrationsFrom() protected method

Register a database migration path.
protected loadMigrationsFrom ( array | string $paths ) : void
$paths array | string
return void

loadRoutesFrom() protected method

Load the given routes file if routes are not already cached.
protected loadRoutesFrom ( string $path ) : void
$path string
return void

loadTranslationsFrom() protected method

Register a translation file namespace.
protected loadTranslationsFrom ( string $path, string $namespace ) : void
$path string
$namespace string
return void

loadViewsFrom() protected method

Register a view file namespace.
protected loadViewsFrom ( string $path, string $namespace ) : void
$path string
$namespace string
return void

mergeConfigFrom() protected method

Merge the given configuration with the existing configuration.
protected mergeConfigFrom ( string $path, string $key ) : void
$path string
$key string
return void

pathsToPublish() public static method

Get the paths to publish.
public static pathsToPublish ( string $provider = null, string $group = null ) : array
$provider string
$group string
return array

provides() public method

Get the services provided by the provider.
public provides ( ) : array
return array

publishes() protected method

Register paths to be published by the publish command.
protected publishes ( array $paths, string $group = null ) : void
$paths array
$group string
return void

when() public method

Get the events that trigger this service provider to register.
public when ( ) : array
return array

Property Details

$app protected_oe property

The application instance.
protected Application,Illuminate\Contracts\Foundation $app
return Illuminate\Contracts\Foundation\Application

$defer protected_oe property

Indicates if loading of the provider is deferred.
protected bool $defer
return boolean

$publishGroups protected_oe static_oe property

The paths that should be published by group.
protected static array $publishGroups
return array

$publishes protected_oe static_oe property

The paths that should be published.
protected static array $publishes
return array