Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 protected function doSendInternalRequests(array $internalRequests, $success, $error)
 {
     $requests = array();
     foreach ($internalRequests as $internalRequest) {
         $requests[] = $this->createRequest($internalRequest, $success, $error);
     }
     class_exists('GuzzleHttp\\Pool') ? Pool::batch($this->client, $requests) : \GuzzleHttp\batch($this->client, $requests);
 }
Beispiel #2
0
 /**
  * @expectedException \InvalidArgumentException
  * @expectedExceptionMessage Invalid event format
  */
 public function testBatchValidatesTheEventFormat()
 {
     $client = new Client();
     $requests = [$client->createRequest('GET', 'http://foo.com/baz')];
     \GuzzleHttp\batch($client, $requests, ['complete' => 'foo']);
 }
Beispiel #3
0
 public function batch($requests)
 {
     return \GuzzleHttp\batch($this->client, $requests);
 }