RequestInterface.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. /**
  3. * Application request
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Framework\App;
  9. /**
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface RequestInterface
  14. {
  15. /**
  16. * Retrieve module name
  17. *
  18. * @return string
  19. */
  20. public function getModuleName();
  21. /**
  22. * Set Module name
  23. *
  24. * @param string $name
  25. * @return $this
  26. */
  27. public function setModuleName($name);
  28. /**
  29. * Retrieve action name
  30. *
  31. * @return string
  32. */
  33. public function getActionName();
  34. /**
  35. * Set action name
  36. *
  37. * @param string $name
  38. * @return $this
  39. */
  40. public function setActionName($name);
  41. /**
  42. * Retrieve param by key
  43. *
  44. * @param string $key
  45. * @param mixed $defaultValue
  46. * @return mixed
  47. */
  48. public function getParam($key, $defaultValue = null);
  49. /**
  50. * Set params from key value array
  51. *
  52. * @param array $params
  53. * @return $this
  54. */
  55. public function setParams(array $params);
  56. /**
  57. * Retrieve all params as array
  58. *
  59. * @return array
  60. */
  61. public function getParams();
  62. /**
  63. * Retrieve cookie value
  64. *
  65. * @param string|null $name
  66. * @param string|null $default
  67. * @return string|null
  68. */
  69. public function getCookie($name, $default);
  70. /**
  71. * Returns whether request was delivered over HTTPS
  72. *
  73. * @return bool
  74. */
  75. public function isSecure();
  76. }