RulesetEndpoint.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. namespace Aws\EndpointV2\Ruleset;
  3. /**
  4. * Represents a fully resolved endpoint that a
  5. * rule returns if input parameters meet its requirements.
  6. */
  7. class RulesetEndpoint
  8. {
  9. /** @var string */
  10. private $url;
  11. /** @var array */
  12. private $properties;
  13. /** @var array */
  14. private $headers;
  15. public function __construct($url, $properties = null, $headers = null)
  16. {
  17. $this->url = $url;
  18. $this->properties = $properties;
  19. $this->headers = $headers;
  20. }
  21. /**
  22. * @return mixed
  23. */
  24. public function getUrl()
  25. {
  26. return $this->url;
  27. }
  28. /**
  29. * @param $property
  30. * @return mixed
  31. */
  32. public function getProperty($property)
  33. {
  34. if (isset($this->properties[$property])) {
  35. return $this->properties[$property];
  36. }
  37. return null;
  38. }
  39. /**
  40. * @return mixed
  41. */
  42. public function getProperties()
  43. {
  44. return $this->properties;
  45. }
  46. /**
  47. * @return mixed
  48. */
  49. public function getHeaders()
  50. {
  51. return $this->headers;
  52. }
  53. }