Interface.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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-2008 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. */
  21. /**
  22. * @category Zend
  23. * @package Zend_Controller
  24. * @subpackage Zend_Controller_Action
  25. * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  26. * @license http://framework.zend.com/license/new-bsd New BSD License
  27. */
  28. interface Zend_Controller_Action_Interface
  29. {
  30. /**
  31. * Class constructor
  32. *
  33. * The request and response objects should be registered with the
  34. * controller, as should be any additional optional arguments; these will be
  35. * available via {@link getRequest()}, {@link getResponse()}, and
  36. * {@link getInvokeArgs()}, respectively.
  37. *
  38. * When overriding the constructor, please consider this usage as a best
  39. * practice and ensure that each is registered appropriately; the easiest
  40. * way to do so is to simply call parent::__construct($request, $response,
  41. * $invokeArgs).
  42. *
  43. * After the request, response, and invokeArgs are set, the
  44. * {@link $_helper helper broker} is initialized.
  45. *
  46. * Finally, {@link init()} is called as the final action of
  47. * instantiation, and may be safely overridden to perform initialization
  48. * tasks; as a general rule, override {@link init()} instead of the
  49. * constructor to customize an action controller's instantiation.
  50. *
  51. * @param Zend_Controller_Request_Abstract $request
  52. * @param Zend_Controller_Response_Abstract $response
  53. * @param array $invokeArgs Any additional invocation arguments
  54. * @return void
  55. */
  56. public function __construct(Zend_Controller_Request_Abstract $request,
  57. Zend_Controller_Response_Abstract $response,
  58. array $invokeArgs = array());
  59. /**
  60. * Dispatch the requested action
  61. *
  62. * @param string $action Method name of action
  63. * @return void
  64. */
  65. public function dispatch($action);
  66. }