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