PHP 인터페이스 Kraken\Supervision\SupervisorInterface

파일 보기 프로젝트 열기: kraken-php/framework 0 사용 예제들

공개 메소드들

메소드 설명
__invoke ( Erro\Error | Exceptio\Exception $ex, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface Solve given Error or Exception with set of params using solver's handler method.
existsParam ( string $key ) : boolean Check if param saved under $key exists.
existsSolver ( string $exception ) : boolean Check if solver for $exception does exist.
getParam ( string $key ) : mixed | null Return param saved under $key or null if it does not exist.
getSolver ( string $exception ) : Kraken\Supervision\SolverInterface | null Return solver for $exception or null if it does not exist.
removeParam ( string $key ) Remove param saved under $key.
removeSolver ( string $exception ) Remove solver for $exception.
setParam ( string $key, mixed $value ) Set value of param saved under $key.
setSolver ( string $exception, Kraken\Supervision\SolverInterface | string | string[] $handler ) Set solver for $exception.
solve ( Erro\Error | Exceptio\Exception $ex, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface Handle error or exception of $ex using known handlers.

메소드 상세

__invoke() 공개 메소드

Solve given Error or Exception with set of params using solver's handler method.
또한 보기: SupervisorInterface::solve
public __invoke ( Erro\Error | Exceptio\Exception $ex, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface
$ex Erro\Error | Exceptio\Exception
$params mixed[]
리턴 Kraken\Promise\PromiseInterface

existsParam() 공개 메소드

Check if param saved under $key exists.
public existsParam ( string $key ) : boolean
$key string
리턴 boolean

existsSolver() 공개 메소드

Check if solver for $exception does exist.
public existsSolver ( string $exception ) : boolean
$exception string
리턴 boolean

getParam() 공개 메소드

Return param saved under $key or null if it does not exist.
public getParam ( string $key ) : mixed | null
$key string
리턴 mixed | null $value

getSolver() 공개 메소드

Return solver for $exception or null if it does not exist.
public getSolver ( string $exception ) : Kraken\Supervision\SolverInterface | null
$exception string
리턴 Kraken\Supervision\SolverInterface | null

removeParam() 공개 메소드

Remove param saved under $key.
public removeParam ( string $key )
$key string

removeSolver() 공개 메소드

Remove solver for $exception.
public removeSolver ( string $exception )
$exception string

setParam() 공개 메소드

Set value of param saved under $key.
public setParam ( string $key, mixed $value )
$key string
$value mixed

setSolver() 공개 메소드

IllegalCallException is thrown if given $handler cannot be resolved.
public setSolver ( string $exception, Kraken\Supervision\SolverInterface | string | string[] $handler )
$exception string
$handler Kraken\Supervision\SolverInterface | string | string[]

solve() 공개 메소드

Returns FulfilledPromise if handler for exception does exist and was executed properly. If handler does not exist or other errors and/or exception were thrown then RejectedPromise is returned.
public solve ( Erro\Error | Exceptio\Exception $ex, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface
$ex Erro\Error | Exceptio\Exception
$params mixed[]
리턴 Kraken\Promise\PromiseInterface