Documentation

ResponsePromise
in package
implements PromiseInterface Uses PromiseTrait

Description of Psr7ResponsePromise

Tags
author

zozlak

Table of Contents

Interfaces

PromiseInterface

Properties

$promise  : PromiseInterface

Methods

__construct()  : mixed
cancel()  : void
getState()  : string
otherwise()  : PromiseInterface
reject()  : void
resolve()  : void
then()  : PromiseInterface
wait()  : ResponseInterface|null

Properties

Methods

__construct()

public __construct(PromiseInterface $promise) : mixed
Parameters
$promise : PromiseInterface

getState()

public getState() : string
Return values
string

otherwise()

public otherwise(callable $onRejected) : PromiseInterface
Parameters
$onRejected : callable
Return values
PromiseInterface

reject()

public reject(mixed $reason) : void
Parameters
$reason : mixed

resolve()

public resolve(mixed $value) : void
Parameters
$value : mixed

then()

public then([callable $onFulfilled = null ][, callable $onRejected = null ]) : PromiseInterface
Parameters
$onFulfilled : callable = null
$onRejected : callable = null
Return values
PromiseInterface

wait()

public wait([bool $unwrap = true ]) : ResponseInterface|null
Parameters
$unwrap : bool = true
Return values
ResponseInterface|null

        
On this page

Search results