GuzzleHttpPromiserejection_for

Creates a rejected promise for a reason if the reason is not a promise.

Description

GuzzleHttp\Promise\rejection_for( (mixed) $reason ); 

If the provided reason is a promise, then it is returned as-is.

Parameters (1)

0. $reason (mixed)
Promise or reason.

Usage

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

Defined (1)

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

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