Interface.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Controller
  17. * @subpackage Zend_Controller_Action
  18. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. /**
  23. * @category Zend
  24. * @package Zend_Controller
  25. * @subpackage Zend_Controller_Action
  26. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  27. * @license http://framework.zend.com/license/new-bsd New BSD License
  28. */
  29. interface Zend_Controller_Action_Interface
  30. {
  31. /**
  32. * Class constructor
  33. *
  34. * The request and response objects should be registered with the
  35. * controller, as should be any additional optional arguments; these will be
  36. * available via {@link getRequest()}, {@link getResponse()}, and
  37. * {@link getInvokeArgs()}, respectively.
  38. *
  39. * When overriding the constructor, please consider this usage as a best
  40. * practice and ensure that each is registered appropriately; the easiest
  41. * way to do so is to simply call parent::__construct($request, $response,
  42. * $invokeArgs).
  43. *
  44. * After the request, response, and invokeArgs are set, the
  45. * {@link $_helper helper broker} is initialized.
  46. *
  47. * Finally, {@link init()} is called as the final action of
  48. * instantiation, and may be safely overridden to perform initialization
  49. * tasks; as a general rule, override {@link init()} instead of the
  50. * constructor to customize an action controller's instantiation.
  51. *
  52. * @param Zend_Controller_Request_Abstract $request
  53. * @param Zend_Controller_Response_Abstract $response
  54. * @param array $invokeArgs Any additional invocation arguments
  55. * @return void
  56. */
  57. public function __construct(Zend_Controller_Request_Abstract $request,
  58. Zend_Controller_Response_Abstract $response,
  59. array $invokeArgs = array());
  60. /**
  61. * Dispatch the requested action
  62. *
  63. * @param string $action Method name of action
  64. * @return void
  65. */
  66. public function dispatch($action);
  67. }