BootableServiceProviderInterface
extends
ServiceProviderInterface
in
Table of Contents
- boot() : void
- Method will be invoked on registration of a service provider implementing this interface. Provides ability for eager loading of Service Providers.
- getContainer() : ContainerInterface
- Get the container
- getIdentifier() : string
- The id of the service provider uniquely identifies it, so that we can quickly determine if it has already been registered.
- getLeagueContainer() : Container
- Get the container. This will be removed in favour of getContainer returning Container in next major release.
- provides() : bool
- Returns a boolean if checking whether this provider provides a specific service or returns an array of provided services if no argument passed.
- register() : void
- Use the register method to register items with the container via the protected $this->leagueContainer property or the `getLeagueContainer` method from the ContainerAwareTrait.
- setContainer() : self
- Set a container
- setIdentifier() : self
- Set a custom id for the service provider. This enables registering the same service provider multiple times.
- setLeagueContainer() : self
- Set a container. This will be removed in favour of setContainer receiving Container in next major release.
Methods
boot()
Method will be invoked on registration of a service provider implementing this interface. Provides ability for eager loading of Service Providers.
public
boot() : void
Return values
void —getContainer()
Get the container
public
getContainer() : ContainerInterface
Return values
ContainerInterface —getIdentifier()
The id of the service provider uniquely identifies it, so that we can quickly determine if it has already been registered.
public
getIdentifier() : string
Defaults to get_class($provider).
Return values
string —getLeagueContainer()
Get the container. This will be removed in favour of getContainer returning Container in next major release.
public
getLeagueContainer() : Container
Return values
Container —provides()
Returns a boolean if checking whether this provider provides a specific service or returns an array of provided services if no argument passed.
public
provides(string $service) : bool
Parameters
- $service : string
Return values
bool —register()
Use the register method to register items with the container via the protected $this->leagueContainer property or the `getLeagueContainer` method from the ContainerAwareTrait.
public
register() : void
Return values
void —setContainer()
Set a container
public
setContainer(ContainerInterface $container) : self
Parameters
- $container : ContainerInterface
Return values
self —setIdentifier()
Set a custom id for the service provider. This enables registering the same service provider multiple times.
public
setIdentifier(string $id) : self
Parameters
- $id : string
Return values
self —setLeagueContainer()
Set a container. This will be removed in favour of setContainer receiving Container in next major release.
public
setLeagueContainer(Container $container) : self
Parameters
- $container : Container