PHP 인터페이스 Kraken\Runtime\RuntimeModelInterface

상속: extends Kraken\Runtime\RuntimeContextInterface, extends Kraken\Runtime\RuntimeManagerAwareInterface, extends Kraken\Supervision\SupervisorAwareInterface, extends Kraken\Core\CoreAwareInterface, extends Kraken\Event\EventEmitterAwareInterface, extends Kraken\Loop\LoopExtendedAwareInterface
파일 보기 프로젝트 열기: kraken-php/framework 0 사용 예제들

공개 메소드들

메소드 설명
create ( ) : Kraken\Promise\PromiseInterface Create model.
destroy ( ) : Kraken\Promise\PromiseInterface Destroy model.
fail ( Erro\Error | Exceptio\Exception $ex, mixed[] $params = [] ) Temporarily switch model 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.
getState ( ) : integer Return state of model.
isCreated ( ) : boolean Checks if model is in created state.
isDestroyed ( ) : boolean Checks if model is in destroyed state.
isFailed ( ) : boolean Checks if model is in stopped state.
isStarted ( ) : boolean Checks if model is in started state.
isState ( integer $state ) : boolean Checks if model is in specified state.
isStopped ( ) : boolean Checks if model is in stopped state.
setState ( integer $state ) Set state of model.
start ( ) : Kraken\Promise\PromiseInterface Start model.
state ( ) : integer
stop ( ) : Kraken\Promise\PromiseInterface Stop model.
succeed ( ) Switch back from failed to normal workflow.

메소드 상세

create() 공개 메소드

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

destroy() 공개 메소드

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

fail() 공개 메소드

Temporarily switch model 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

getState() 공개 메소드

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

isCreated() 공개 메소드

Checks if model is in created state.
public isCreated ( ) : boolean
리턴 boolean

isDestroyed() 공개 메소드

Checks if model is in destroyed state.
public isDestroyed ( ) : boolean
리턴 boolean

isFailed() 공개 메소드

Checks if model is in stopped state.
public isFailed ( ) : boolean
리턴 boolean

isStarted() 공개 메소드

Checks if model is in started state.
public isStarted ( ) : boolean
리턴 boolean

isState() 공개 메소드

State might be one of: Runtime::STATE_CREATED Runtime::STATE_STARTED Runtime::STATE_STOPPED Runtime::STATE_DESTROYED Runtime::STATE_FAILED
public isState ( integer $state ) : boolean
$state integer
리턴 boolean

isStopped() 공개 메소드

Checks if model is in stopped state.
public isStopped ( ) : boolean
리턴 boolean

setState() 공개 메소드

The state might be one of: Runtime::STATE_CREATED Runtime::STATE_STARTED Runtime::STATE_STOPPED Runtime::STATE_DESTROYED
public setState ( integer $state )
$state integer

start() 공개 메소드

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

state() 공개 메소드

public state ( ) : integer
리턴 integer

stop() 공개 메소드

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

succeed() 공개 메소드

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