PushedResponse.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\HttpClient\Internal;
  11. use Symfony\Component\HttpClient\Response\CurlResponse;
  12. /**
  13. * A pushed response with its request headers.
  14. *
  15. * @author Alexander M. Turek <me@derrabus.de>
  16. *
  17. * @internal
  18. */
  19. final class PushedResponse
  20. {
  21. /**
  22. * @var \Symfony\Component\HttpClient\Response\CurlResponse
  23. */
  24. public $response;
  25. /** @var string[] */
  26. public $requestHeaders;
  27. /**
  28. * @var mixed[]
  29. */
  30. public $parentOptions = [];
  31. public $handle;
  32. /**
  33. * @param \Symfony\Component\HttpClient\Response\CurlResponse $response
  34. * @param mixed[] $requestHeaders
  35. * @param mixed[] $parentOptions
  36. */
  37. public function __construct($response, $requestHeaders, $parentOptions, $handle)
  38. {
  39. $this->response = $response;
  40. $this->requestHeaders = $requestHeaders;
  41. $this->parentOptions = $parentOptions;
  42. $this->handle = $handle;
  43. }
  44. }