CurlFactoryInterface.php 657 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace GuzzleHttp\Handler;
  3. use Psr\Http\Message\RequestInterface;
  4. interface CurlFactoryInterface
  5. {
  6. /**
  7. * Creates a cURL handle resource.
  8. *
  9. * @param RequestInterface $request Request
  10. * @param array $options Transfer options
  11. *
  12. * @throws \RuntimeException when an option cannot be applied
  13. */
  14. public function create(RequestInterface $request, array $options): EasyHandle;
  15. /**
  16. * Release an easy handle, allowing it to be reused or closed.
  17. *
  18. * This function must call unset on the easy handle's "handle" property.
  19. */
  20. public function release(EasyHandle $easy): void;
  21. }