src/Pool.php
public function addPromise(
        ClientRequestInterface $request,
        callable $startingSuccessCallback = null,
        callable $startingFailCallback = null
    ): ApiResponseInterface {
        $return = $this->promises[$request->getIdentifier()] = $this->createStartingPromise(
            $request,
            $startingSuccessCallback,
            $startingFailCallback
        );

        return $return;
    }
public function addPromise(
        ClientRequestInterface $request,
        callable $startingSuccessCallback = null,
        callable $startingFailCallback = null
    ): ApiResponseInterface {
        $return = $this->promises[$request->getIdentifier()] = $this->createStartingPromise(
            $request,
            $startingSuccessCallback,
            $startingFailCallback
        );

        return $return;
    }
public function addPromise ( ClientRequestInterface $ request , callable $ startingSuccessCallback = null , callable $ startingFailCallback = null ) : ApiResponseInterface { $ return = $ this -> promises [ $ request -> getIdentifier ( ) ] = $ this -> createStartingPromise ( $ request , $ startingSuccessCallback , $ startingFailCallback ) ; return $ return ; }
Adds a promise to this pool.
@param ClientRequestInterface $request
@param callable $startingSuccessCallback Overwrite the starting success callback.
@param callable $startingFailCallback Overwrite the failing success callback.
@return ApiResponseInterface
Adds a promise to this pool .