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); }
private function throwException(\Exception $e, BatchContext $context) { if ($context->throwsExceptions() || $e instanceof RequestException && $e->getThrowImmediately()) { $context->removeAll(); $this->releaseMultiHandle($context->getMultiHandle()); throw $e; } }
private function throwException(RequestException $e, BatchContext $context) { if ($context->throwsExceptions()) { $this->releaseMultiHandle($context->getMultiHandle()); throw $e; } }