UriInterface.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <?php
  2. namespace OAuth\Common\Http\Uri;
  3. interface UriInterface
  4. {
  5. /**
  6. * @return string
  7. */
  8. public function getScheme();
  9. /**
  10. * @param string $scheme
  11. */
  12. public function setScheme($scheme);
  13. /**
  14. * @return string
  15. */
  16. public function getHost();
  17. /**
  18. * @param string $host
  19. */
  20. public function setHost($host);
  21. /**
  22. * @return int
  23. */
  24. public function getPort();
  25. /**
  26. * @param int $port
  27. */
  28. public function setPort($port);
  29. /**
  30. * @return string
  31. */
  32. public function getPath();
  33. /**
  34. * @param string $path
  35. */
  36. public function setPath($path);
  37. /**
  38. * @return string
  39. */
  40. public function getQuery();
  41. /**
  42. * @param string $query
  43. */
  44. public function setQuery($query);
  45. /**
  46. * Adds a param to the query string.
  47. *
  48. * @param string $var
  49. * @param string $val
  50. */
  51. public function addToQuery($var, $val);
  52. /**
  53. * @return string
  54. */
  55. public function getFragment();
  56. /**
  57. * Should return URI user info, masking protected user info data according to rfc3986-3.2.1
  58. *
  59. * @return string
  60. */
  61. public function getUserInfo();
  62. /**
  63. * @param string $userInfo
  64. */
  65. public function setUserInfo($userInfo);
  66. /**
  67. * Should return the URI Authority, masking protected user info data according to rfc3986-3.2.1
  68. *
  69. * @return string
  70. */
  71. public function getAuthority();
  72. /**
  73. * Should return the URI string, masking protected user info data according to rfc3986-3.2.1
  74. *
  75. * @return string the URI string with user protected info masked
  76. */
  77. public function __toString();
  78. /**
  79. * Should return the URI Authority without masking protected user info data
  80. *
  81. * @return string
  82. */
  83. public function getRawAuthority();
  84. /**
  85. * Should return the URI user info without masking protected user info data
  86. *
  87. * @return string
  88. */
  89. public function getRawUserInfo();
  90. /**
  91. * Build the full URI based on all the properties
  92. *
  93. * @return string The full URI without masking user info
  94. */
  95. public function getAbsoluteUri();
  96. /**
  97. * Build the relative URI based on all the properties
  98. *
  99. * @return string The relative URI
  100. */
  101. public function getRelativeUri();
  102. /**
  103. * @return bool
  104. */
  105. public function hasExplicitTrailingHostSlash();
  106. /**
  107. * @return bool
  108. */
  109. public function hasExplicitPortSpecified();
  110. }