PHP 클래스 SparkPost\SparkPostPromise

상속: implements Http\Promise\Promise
파일 보기 프로젝트 열기: sparkpost/php-sparkpost 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Http\Promise\Promise $promise ) set the promise to be wrapped.
getState ( ) Hand back the state.
then ( callable $onFulfilled = null, callable $onRejected = null ) Hand off the response functions to the original promise and return a custom response or exception.
wait ( boolean $unwrap = true ) : SparkPostResponse Wraps the wait function and returns a custom response or throws a custom exception.

메소드 상세

__construct() 공개 메소드

set the promise to be wrapped.
public __construct ( Http\Promise\Promise $promise )
$promise Http\Promise\Promise

getState() 공개 메소드

Hand back the state.
public getState ( )

then() 공개 메소드

Hand off the response functions to the original promise and return a custom response or exception.
public then ( callable $onFulfilled = null, callable $onRejected = null )
$onFulfilled callable - function to be called if the promise is fulfilled
$onRejected callable - function to be called if the promise is rejected

wait() 공개 메소드

Wraps the wait function and returns a custom response or throws a custom exception.
public wait ( boolean $unwrap = true ) : SparkPostResponse
$unwrap boolean
리턴 SparkPostResponse