PHP 인터페이스 Kraken\Runtime\RuntimeContainerInterface

상속: extends Kraken\Runtime\RuntimeContextInterface, extends Kraken\Core\CoreGetterAwareInterface, extends Kraken\Event\EventEmitterInterface, extends Kraken\Loop\LoopGetterAwareInterface
파일 보기 프로젝트 열기: kraken-php/framework 0 사용 예제들

공개 메소드들

메소드 설명
create ( ) : Kraken\Promise\PromiseInterface Create container.
destroy ( ) : Kraken\Promise\PromiseInterface Destroy container.
fail ( Erro\Error | Exceptio\Exception $ex, mixed[] $params = [] ) Temporarily switch container to failed workflow and allow supervisor to take control.
getHash ( ) : string | null Return failure hash if the container is in the failed state or null if it is not.
getManager ( ) : Kraken\Runtime\RuntimeManagerInterface Return runtime manager set to this container instance.
getModel ( ) : Kraken\Runtime\RuntimeModelInterface Return model on which container is working
getState ( ) : integer Return current state of the container.
isCreated ( ) : boolean Check if container is in created state.
isDestroyed ( ) : boolean Check if container is in destroyed state.
isFailed ( ) : boolean Check if container is in failed state.
isStarted ( ) : boolean Check if container is in started state.
isStopped ( ) : boolean Check if container is in stopped state.
onAfterCreate ( callable $callback ) : EventListener Attach afterCreate event handler.
onAfterDestroy ( callable $callback ) : EventListener Attach afterDestroy event handler.
onAfterStart ( callable $callback ) : EventListener Attach afterStart event handler.
onAfterStop ( callable $callback ) : EventListener Attach afterStop event handler.
onBeforeCreate ( callable $callback ) : EventListener Attach beforeCreate event handler.
onBeforeDestroy ( callable $callback ) : EventListener Attach beforeDestroy event handler.
onBeforeStart ( callable $callback ) : EventListener Attach beforeStart event handler.
onBeforeStop ( callable $callback ) : EventListener Attach beforeStop event handler.
onCreate ( callable $callback ) : EventListener Attach create event handler.
onDestroy ( callable $callback ) : EventListener Attach destroy event handler.
onStart ( callable $callback ) : EventListener Attach start event handler.
onStop ( callable $callback ) : EventListener Attach stop event handler.
start ( ) : Kraken\Promise\PromiseInterface Start container.
stop ( ) : Kraken\Promise\PromiseInterface Stop container.
succeed ( ) Switch back from failed to normal workflow.

메소드 상세

create() 공개 메소드

Create container.
public create ( ) : Kraken\Promise\PromiseInterface
리턴 Kraken\Promise\PromiseInterface

destroy() 공개 메소드

Destroy container.
public destroy ( ) : Kraken\Promise\PromiseInterface
리턴 Kraken\Promise\PromiseInterface

fail() 공개 메소드

Temporarily switch container to failed workflow and allow supervisor to take control.
public fail ( Erro\Error | Exceptio\Exception $ex, mixed[] $params = [] )
$ex Erro\Error | Exceptio\Exception
$params mixed[]

getHash() 공개 메소드

Return failure hash if the container is in the failed state or null if it is not.
public getHash ( ) : string | null
리턴 string | null

getManager() 공개 메소드

Return runtime manager set to this container instance.
public getManager ( ) : Kraken\Runtime\RuntimeManagerInterface
리턴 Kraken\Runtime\RuntimeManagerInterface

getModel() 공개 메소드

Return model on which container is working
public getModel ( ) : Kraken\Runtime\RuntimeModelInterface
리턴 Kraken\Runtime\RuntimeModelInterface

getState() 공개 메소드

Returned value might be one of: Runtime::STATE_CREATED Runtime::STATE_STARTED Runtime::STATE_STOPPED Runtime::STATE_DESTROYED Runtime::STATE_FAILED
public getState ( ) : integer
리턴 integer

isCreated() 공개 메소드

Check if container is in created state.
public isCreated ( ) : boolean
리턴 boolean

isDestroyed() 공개 메소드

Check if container is in destroyed state.
public isDestroyed ( ) : boolean
리턴 boolean

isFailed() 공개 메소드

Check if container is in failed state.
public isFailed ( ) : boolean
리턴 boolean

isStarted() 공개 메소드

Check if container is in started state.
public isStarted ( ) : boolean
리턴 boolean

isStopped() 공개 메소드

Check if container is in stopped state.
public isStopped ( ) : boolean
리턴 boolean

onAfterCreate() 공개 메소드

Attach afterCreate event handler.
public onAfterCreate ( callable $callback ) : EventListener
$callback callable
리턴 Kraken\Event\EventListener

onAfterDestroy() 공개 메소드

Attach afterDestroy event handler.
public onAfterDestroy ( callable $callback ) : EventListener
$callback callable
리턴 Kraken\Event\EventListener

onAfterStart() 공개 메소드

Attach afterStart event handler.
public onAfterStart ( callable $callback ) : EventListener
$callback callable
리턴 Kraken\Event\EventListener

onAfterStop() 공개 메소드

Attach afterStop event handler.
public onAfterStop ( callable $callback ) : EventListener
$callback callable
리턴 Kraken\Event\EventListener

onBeforeCreate() 공개 메소드

Attach beforeCreate event handler.
public onBeforeCreate ( callable $callback ) : EventListener
$callback callable
리턴 Kraken\Event\EventListener

onBeforeDestroy() 공개 메소드

Attach beforeDestroy event handler.
public onBeforeDestroy ( callable $callback ) : EventListener
$callback callable
리턴 Kraken\Event\EventListener

onBeforeStart() 공개 메소드

Attach beforeStart event handler.
public onBeforeStart ( callable $callback ) : EventListener
$callback callable
리턴 Kraken\Event\EventListener

onBeforeStop() 공개 메소드

Attach beforeStop event handler.
public onBeforeStop ( callable $callback ) : EventListener
$callback callable
리턴 Kraken\Event\EventListener

onCreate() 공개 메소드

Attach create event handler.
public onCreate ( callable $callback ) : EventListener
$callback callable
리턴 Kraken\Event\EventListener

onDestroy() 공개 메소드

Attach destroy event handler.
public onDestroy ( callable $callback ) : EventListener
$callback callable
리턴 Kraken\Event\EventListener

onStart() 공개 메소드

Attach start event handler.
public onStart ( callable $callback ) : EventListener
$callback callable
리턴 Kraken\Event\EventListener

onStop() 공개 메소드

Attach stop event handler.
public onStop ( callable $callback ) : EventListener
$callback callable
리턴 Kraken\Event\EventListener

start() 공개 메소드

Start container.
public start ( ) : Kraken\Promise\PromiseInterface
리턴 Kraken\Promise\PromiseInterface

stop() 공개 메소드

Stop container.
public stop ( ) : Kraken\Promise\PromiseInterface
리턴 Kraken\Promise\PromiseInterface

succeed() 공개 메소드

Switch back from failed to normal workflow.
public succeed ( )