RouterContextStamp.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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\Messenger\Stamp;
  11. /**
  12. * @author Jérémy Derussé <jeremy@derusse.com>
  13. */
  14. class RouterContextStamp implements StampInterface
  15. {
  16. private $baseUrl;
  17. private $method;
  18. private $host;
  19. private $scheme;
  20. private $httpPort;
  21. private $httpsPort;
  22. private $pathInfo;
  23. private $queryString;
  24. public function __construct(string $baseUrl, string $method, string $host, string $scheme, int $httpPort, int $httpsPort, string $pathInfo, string $queryString)
  25. {
  26. $this->baseUrl = $baseUrl;
  27. $this->method = $method;
  28. $this->host = $host;
  29. $this->scheme = $scheme;
  30. $this->httpPort = $httpPort;
  31. $this->httpsPort = $httpsPort;
  32. $this->pathInfo = $pathInfo;
  33. $this->queryString = $queryString;
  34. }
  35. public function getBaseUrl(): string
  36. {
  37. return $this->baseUrl;
  38. }
  39. public function getMethod(): string
  40. {
  41. return $this->method;
  42. }
  43. public function getHost(): string
  44. {
  45. return $this->host;
  46. }
  47. public function getScheme(): string
  48. {
  49. return $this->scheme;
  50. }
  51. public function getHttpPort(): int
  52. {
  53. return $this->httpPort;
  54. }
  55. public function getHttpsPort(): int
  56. {
  57. return $this->httpsPort;
  58. }
  59. public function getPathInfo(): string
  60. {
  61. return $this->pathInfo;
  62. }
  63. public function getQueryString(): string
  64. {
  65. return $this->queryString;
  66. }
  67. }