Copied!
CloneableFinalInstantiable
Methods
public static exceptionFor( $reason)
 

Create an exception for a rejected promise value.

  • param mixed $reason
  • return Exception|Throwable
public static iterFor( $value)
 

Returns an iterator for the given value.

  • param mixed $value
  • return Iterator
public static promiseFor( $value)
 

Creates a promise for a value if the value is not a promise.

public static rejectionFor( $reason)
 

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

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

Methods
public static exceptionFor( $reason)
 

Create an exception for a rejected promise value.

  • param mixed $reason
  • return Exception|Throwable
public static iterFor( $value)
 

Returns an iterator for the given value.

  • param mixed $value
  • return Iterator
public static promiseFor( $value)
 

Creates a promise for a value if the value is not a promise.

public static rejectionFor( $reason)
 

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

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

© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration