Пример #1
0
 public function testProvidesGetters()
 {
     $m = curl_multi_init();
     $b = new BatchContext($m, true);
     $this->assertTrue($b->throwsExceptions());
     $this->assertSame($m, $b->getMultiHandle());
     $this->assertFalse($b->hasPending());
     curl_multi_close($m);
 }
Пример #2
0
 private function throwException(\Exception $e, BatchContext $context)
 {
     if ($context->throwsExceptions() || $e instanceof RequestException && $e->getThrowImmediately()) {
         $context->removeAll();
         $this->releaseMultiHandle($context->getMultiHandle());
         throw $e;
     }
 }
Пример #3
0
 private function throwException(RequestException $e, BatchContext $context)
 {
     if ($context->throwsExceptions()) {
         $this->releaseMultiHandle($context->getMultiHandle());
         throw $e;
     }
 }