PHP Class Kraken\Container\ServiceProvider

Inheritance: implements Kraken\Container\ServiceProviderInterface
Show file Open project: kraken-php/framework Class Usage Examples

Protected Properties

Property Type Description
$booted boolean
$provides string[]
$registered boolean
$requires string[]

Public Methods

Method Description
bootProvider ( ContainerInterface $container )
getProvides ( )
getRequires ( )
isBooted ( )
isRegistered ( )
registerProvider ( ContainerInterface $container )
unregisterProvider ( ContainerInterface $container )

Protected Methods

Method Description
boot ( ContainerInterface $container ) Boot provider dependencies.
register ( ContainerInterface $container ) Register provider dependencies.
unregister ( ContainerInterface $container ) Unregister provider dependencies.

Private Methods

Method Description
throwException ( Erro\Error | Exceptio\Exception $ex )

Method Details

boot() protected method

This method should container code to fire when Provider is being booted. In comparison to ::register() method this will be fired after all Providers have been already registered.
protected boot ( ContainerInterface $container )
$container ContainerInterface

bootProvider() public method

public bootProvider ( ContainerInterface $container )
$container ContainerInterface

getProvides() public method

public getProvides ( )

getRequires() public method

public getRequires ( )

isBooted() public method

public isBooted ( )

isRegistered() public method

public isRegistered ( )

register() protected method

This method should contain code to fire when Provider is being registered.
protected register ( ContainerInterface $container )
$container ContainerInterface

registerProvider() public method

public registerProvider ( ContainerInterface $container )
$container ContainerInterface

unregister() protected method

This method should contain code to fire when Provider is being unregistered. All previously opened connectios, streams, files and other vulnerable resources opened in ::register() should be closed here.
protected unregister ( ContainerInterface $container )
$container ContainerInterface

unregisterProvider() public method

public unregisterProvider ( ContainerInterface $container )
$container ContainerInterface

Property Details

$booted protected property

protected bool $booted
return boolean

$provides protected property

protected string[] $provides
return string[]

$registered protected property

protected bool $registered
return boolean

$requires protected property

protected string[] $requires
return string[]