RequestInterface.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. /**
  3. *
  4. * Cube Framework $Id$ xuUbgTpshvl3qchefwQ1mxegMwlVcXKnjZnsWLN6GAQ=
  5. *
  6. * @link http://codecu.be/framework
  7. * @copyright Copyright (c) 2015 CodeCube SRL
  8. * @license http://codecu.be/framework/license Commercial License
  9. *
  10. * @version 1.4
  11. */
  12. namespace Cube\Controller\Request;
  13. /**
  14. * request object interface
  15. *
  16. * Interface RequestInterface
  17. *
  18. * @package Cube\Controller\Request
  19. */
  20. interface RequestInterface
  21. {
  22. public function getParams();
  23. /**
  24. *
  25. * set multiple request params
  26. *
  27. * @param array $params
  28. */
  29. public function setParams(array $params = null);
  30. /**
  31. *
  32. * returns the value of a variable from a request
  33. *
  34. * @param string $name
  35. * @param mixed $default a default value in case the variable is not set
  36. */
  37. public function getParam($name, $default = null);
  38. /**
  39. *
  40. * set the value of a request param
  41. *
  42. * @param string $key
  43. * @param string $value
  44. */
  45. public function setParam($key, $value);
  46. public function getModule();
  47. /**
  48. *
  49. * set the name of the module for the routed request (all module names start with a capital letter)
  50. *
  51. * @param string $module
  52. */
  53. public function setModule($module);
  54. public function getController();
  55. /**
  56. *
  57. * set the name of the action controller for the routed request (all module names start with a capital letter)
  58. *
  59. * @param string $controller
  60. */
  61. public function setController($controller);
  62. public function getAction();
  63. /**
  64. *
  65. * set the name of the action from the routed request
  66. *
  67. * @param string $action
  68. */
  69. public function setAction($action);
  70. }