ConnectException.php 726 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace GuzzleHttp\Exception;
  3. use Psr\Http\Message\RequestInterface;
  4. /**
  5. * Exception thrown when a connection cannot be established.
  6. *
  7. * Note that no response is present for a ConnectException
  8. */
  9. class ConnectException extends RequestException
  10. {
  11. public function __construct(
  12. $message,
  13. RequestInterface $request,
  14. \Exception $previous = null,
  15. array $handlerContext = []
  16. ) {
  17. parent::__construct($message, $request, null, $previous, $handlerContext);
  18. }
  19. /**
  20. * @return null
  21. */
  22. public function getResponse()
  23. {
  24. return null;
  25. }
  26. /**
  27. * @return bool
  28. */
  29. public function hasResponse()
  30. {
  31. return false;
  32. }
  33. }