Documentation

PromiseInterface
in

HTTP promise interface

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
5.2.0

Table of Contents

Methods

cancel()  : void
Cancel method
catch()  : PromiseInterface
Method to set failure callable
finally()  : PromiseInterface
Method to set finally callable
forward()  : PromiseInterface
Forward method
getCancel()  : CallableObject|null
Method to get cancel callable
getFailure()  : CallableObject|null
Method to get failure callable
getFinally()  : CallableObject|null
Method to get finally callable
getPromiser()  : Client|CurlMulti
Method to get client promiser
getState()  : string
Method to get current state
getSuccess()  : array<string|int, mixed>|CallableObject|null
Method to get success callable
hasCancel()  : bool
Method to check cancel callable
hasFailure()  : bool
Method to check failure callable
hasFinally()  : bool
Method to check finally callable
hasPromiser()  : bool
Method to check client promiser
hasState()  : bool
Method to check current state
hasSuccess()  : bool
Method to check success callable
isCancelled()  : bool
Determine is the promise is cancelled
isFulfilled()  : bool
Determine is the promise is fulfilled
isPending()  : bool
Determine is the promise is pending
isRejected()  : bool
Determine is the promise is rejected
resolve()  : void
Resolve method
setCancel()  : PromiseInterface
Method to set cancel callable
setFailure()  : PromiseInterface
Method to set failure callable
setFinally()  : PromiseInterface
Method to set finally callable
setPromiser()  : PromiseInterface
Method to set client promiser
setState()  : PromiseInterface
Method to set current state
setSuccess()  : PromiseInterface
Method to set success callable
then()  : PromiseInterface
Then method
wait()  : Response|array<string|int, mixed>|null
Wait method

Methods

getState()

Method to get current state

public getState() : string
Return values
string

getSuccess()

Method to get success callable

public getSuccess([int|null $i = null ]) : array<string|int, mixed>|CallableObject|null
Parameters
$i : int|null = null
Return values
array<string|int, mixed>|CallableObject|null

hasCancel()

Method to check cancel callable

public hasCancel() : bool
Return values
bool

hasFailure()

Method to check failure callable

public hasFailure() : bool
Return values
bool

hasFinally()

Method to check finally callable

public hasFinally() : bool
Return values
bool

hasPromiser()

Method to check client promiser

public hasPromiser() : bool
Return values
bool

hasState()

Method to check current state

public hasState() : bool
Return values
bool

hasSuccess()

Method to check success callable

public hasSuccess([int|null $i = null ]) : bool
Parameters
$i : int|null = null
Return values
bool

isCancelled()

Determine is the promise is cancelled

public isCancelled() : bool
Return values
bool

isFulfilled()

Determine is the promise is fulfilled

public isFulfilled() : bool
Return values
bool

isPending()

Determine is the promise is pending

public isPending() : bool
Return values
bool

isRejected()

Determine is the promise is rejected

public isRejected() : bool
Return values
bool

wait()

Wait method

public wait([bool $unwrap = true ]) : Response|array<string|int, mixed>|null
Parameters
$unwrap : bool = true
Return values
Response|array<string|int, mixed>|null

        
On this page

Search results