public function fetchGroupsInfromation($rejectedCallbackFunction) {

        $pool = new Pool($this->client, $this->createdRequests, [
            'concurrency' => 18,
            'fulfilled'   => function ($response, $index) {
                $responseJson                    = json_decode($response->getBody()->getContents());
                $groupPagesIterator              = new MarketGroupsPagesIterator($responseJson, $this->client);
                $this->acceptedResponses[$index] = iterator_to_array($groupPagesIterator->getAllPages());
            },
            'rejected'    => function ($reason, $index) use (&$rejectedCallbackFunction)  {
                call_user_func_array($rejectedCallbackFunction, array($reason, $index));
            },
        ]);

        $promise = $pool->promise();
        $promise->wait();
    }
public function fetchGroupsInfromation($rejectedCallbackFunction) {

        $pool = new Pool($this->client, $this->createdRequests, [
            'concurrency' => 18,
            'fulfilled'   => function ($response, $index) {
                $responseJson                    = json_decode($response->getBody()->getContents());
                $groupPagesIterator              = new MarketGroupsPagesIterator($responseJson, $this->client);
                $this->acceptedResponses[$index] = iterator_to_array($groupPagesIterator->getAllPages());
            },
            'rejected'    => function ($reason, $index) use (&$rejectedCallbackFunction)  {
                call_user_func_array($rejectedCallbackFunction, array($reason, $index));
            },
        ]);

        $promise = $pool->promise();
        $promise->wait();
    }
public function fetchGroupsInfromation ( $ rejectedCallbackFunction ) { $ pool = new Pool ( $ this -> client , $ this -> createdRequests , [ 'concurrency' => 18 , 'fulfilled' => function ( $ response , $ index ) { $ responseJson = json_decode ( $ response -> getBody ( ) -> getContents ( ) ) ; $ groupPagesIterator = new MarketGroupsPagesIterator ( $ responseJson , $ this -> client ) ; $ this -> acceptedResponses [ $ index ] = iterator_to_array ( $ groupPagesIterator -> getAllPages ( ) ) ; } , 'rejected' => function ( $ reason , $ index ) use ( & $ rejectedCallbackFunction ) { call_user_func_array ( $ rejectedCallbackFunction , array ( $ reason , $ index ) ) ; } , ] ) ; $ promise = $ pool -> promise ( ) ; $ promise -> wait ( ) ; }
Uses the Guzzel Pool to process Requests.

Processes with a concurrency of 18, since Eve limits to 20.

Uses a promise and will wait until finished.

@param callback function - used for rejected responses. $reason and $index are injected.
Uses the Guzzel Pool to process Requests .