PHP Class Kraken\Runtime\RuntimeContainer

Inheritance: extends Kraken\Event\EventEmitter, implements Kraken\Runtime\RuntimeContainerInterface
Show file Open project: kraken-php/framework Class Usage Examples

Protected Properties

Property Type Description
$model Kraken\Runtime\RuntimeModelInterface

Public Methods

Method Description
__construct ( string $parent, string $alias, string $name, string[] $args = [] )
__destruct ( )
create ( )
destroy ( )
fail ( $ex, $params = [] )
getAlias ( )
getArgs ( )
getCore ( )
getHash ( )
getLoop ( )
getManager ( )
getModel ( )
getName ( )
getParent ( )
getState ( )
getType ( )
internalBoot ( Kraken\Core\CoreInterface $core ) : Kraken\Runtime\RuntimeContainerInterface
internalConfig ( Kraken\Core\CoreInterface $core ) : array
internalConstruct ( Kraken\Core\CoreInterface $core ) : Kraken\Runtime\RuntimeContainerInterface
isCreated ( )
isDestroyed ( )
isFailed ( )
isStarted ( )
isStopped ( )
onAfterCreate ( callable $callback )
onAfterDestroy ( callable $callback )
onAfterStart ( callable $callback )
onAfterStop ( callable $callback )
onBeforeCreate ( callable $callback )
onBeforeDestroy ( callable $callback )
onBeforeStart ( callable $callback )
onBeforeStop ( callable $callback )
onCreate ( callable $callback )
onDestroy ( callable $callback )
onStart ( callable $callback )
onStop ( callable $callback )
setCore ( Kraken\Core\CoreInterface $core = null )
start ( )
stop ( )
succeed ( )

Protected Methods

Method Description
boot ( Kraken\Core\CoreInterface $core ) : Kraken\Runtime\RuntimeContainerInterface This method will be called on container boot. It should contain tweaks to services and providers.
config ( Kraken\Core\CoreInterface $core ) : array This method will be called before container boot. It should contain and return additional configurations.
construct ( Kraken\Core\CoreInterface $core ) : Kraken\Runtime\RuntimeContainerInterface This method will be called on container construction. It should contain logic to be fired after booting up.

Method Details

__construct() public method

public __construct ( string $parent, string $alias, string $name, string[] $args = [] )
$parent string
$alias string
$name string
$args string[]

__destruct() public method

public __destruct ( )

boot() protected method

This method
protected boot ( Kraken\Core\CoreInterface $core ) : Kraken\Runtime\RuntimeContainerInterface
$core Kraken\Core\CoreInterface
return Kraken\Runtime\RuntimeContainerInterface

config() protected method

This method will be called before container boot. It should contain and return additional configurations.
protected config ( Kraken\Core\CoreInterface $core ) : array
$core Kraken\Core\CoreInterface
return array

construct() protected method

This method will be called on container construction. It should contain logic to be fired after booting up.
protected construct ( Kraken\Core\CoreInterface $core ) : Kraken\Runtime\RuntimeContainerInterface
$core Kraken\Core\CoreInterface
return Kraken\Runtime\RuntimeContainerInterface

create() public method

public create ( )

destroy() public method

public destroy ( )

fail() public method

public fail ( $ex, $params = [] )

getAlias() public method

public getAlias ( )

getArgs() public method

public getArgs ( )

getCore() public method

public getCore ( )

getHash() public method

public getHash ( )

getLoop() public method

public getLoop ( )

getManager() public method

public getManager ( )

getModel() public method

public getModel ( )

getName() public method

public getName ( )

getParent() public method

public getParent ( )

getState() public method

public getState ( )

getType() public method

public getType ( )

internalBoot() public method

public internalBoot ( Kraken\Core\CoreInterface $core ) : Kraken\Runtime\RuntimeContainerInterface
$core Kraken\Core\CoreInterface
return Kraken\Runtime\RuntimeContainerInterface

internalConfig() public method

public internalConfig ( Kraken\Core\CoreInterface $core ) : array
$core Kraken\Core\CoreInterface
return array

internalConstruct() public method

public internalConstruct ( Kraken\Core\CoreInterface $core ) : Kraken\Runtime\RuntimeContainerInterface
$core Kraken\Core\CoreInterface
return Kraken\Runtime\RuntimeContainerInterface

isCreated() public method

public isCreated ( )

isDestroyed() public method

public isDestroyed ( )

isFailed() public method

public isFailed ( )

isStarted() public method

public isStarted ( )

isStopped() public method

public isStopped ( )

onAfterCreate() public method

public onAfterCreate ( callable $callback )
$callback callable

onAfterDestroy() public method

public onAfterDestroy ( callable $callback )
$callback callable

onAfterStart() public method

public onAfterStart ( callable $callback )
$callback callable

onAfterStop() public method

public onAfterStop ( callable $callback )
$callback callable

onBeforeCreate() public method

public onBeforeCreate ( callable $callback )
$callback callable

onBeforeDestroy() public method

public onBeforeDestroy ( callable $callback )
$callback callable

onBeforeStart() public method

public onBeforeStart ( callable $callback )
$callback callable

onBeforeStop() public method

public onBeforeStop ( callable $callback )
$callback callable

onCreate() public method

public onCreate ( callable $callback )
$callback callable

onDestroy() public method

public onDestroy ( callable $callback )
$callback callable

onStart() public method

public onStart ( callable $callback )
$callback callable

onStop() public method

public onStop ( callable $callback )
$callback callable

setCore() public method

public setCore ( Kraken\Core\CoreInterface $core = null )
$core Kraken\Core\CoreInterface

start() public method

public start ( )

stop() public method

public stop ( )

succeed() public method

public succeed ( )

Property Details

$model protected property

protected RuntimeModelInterface,Kraken\Runtime $model
return Kraken\Runtime\RuntimeModelInterface