GuzzleHttpPromiseinspect

Synchronously waits on a promise to resolve and returns an inspection state array.

Description

(array) GuzzleHttp\Promise\inspect( (PromiseInterface) GuzzleHttp\Promise\PromiseInterface $promise ); 

Returns a state associative array containing a state key mapping to a valid promise state. If the state of the promise is fulfilled,, the array will contain a value key mapping to the fulfilled value of the promise. If the promise is rejected, the array will contain a reason key mapping to the rejection reason of the promise.

Returns (array)

Parameters (1)

0. $promise (PromiseInterface) => GuzzleHttp\Promise\PromiseInterface $promise
Promise or value.

Usage

  1. if ( !function_exists( 'GuzzleHttp\Promise\inspect' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'w3-total-cache/lib/Azure/GuzzleHttp/Promise/functions.php'; 
  3.  
  4. // Promise or value. 
  5. $promise = GuzzleHttp\Promise\PromiseInterface $promise; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = GuzzleHttp\Promise\inspect($promise); 
  9.  

Defined (1)

The function is defined in the following location(s).

/lib/Azure/GuzzleHttp/Promise/functions.php