1: <?php
2:
3: namespace Alpha\Controller;
4:
5: /**
6: * The interface for all page controllers.
7: *
8: * @since 1.0
9: *
10: * @author John Collins <dev@alphaframework.org>
11: *
12: * @license http://www.opensource.org/licenses/bsd-license.php The BSD License
13: * @copyright Copyright (c) 2016, John Collins (founder of Alpha Framework).
14: * All rights reserved.
15: *
16: * <pre>
17: * Redistribution and use in source and binary forms, with or
18: * without modification, are permitted provided that the
19: * following conditions are met:
20: *
21: * * Redistributions of source code must retain the above
22: * copyright notice, this list of conditions and the
23: * following disclaimer.
24: * * Redistributions in binary form must reproduce the above
25: * copyright notice, this list of conditions and the
26: * following disclaimer in the documentation and/or other
27: * materials provided with the distribution.
28: * * Neither the name of the Alpha Framework nor the names
29: * of its contributors may be used to endorse or promote
30: * products derived from this software without specific
31: * prior written permission.
32: *
33: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
34: * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
35: * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
36: * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
37: * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
38: * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
39: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
40: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
41: * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
42: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
43: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
44: * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
45: * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
46: * </pre>
47: */
48: interface ControllerInterface
49: {
50: /**
51: * Handles HEAD HTTP requests.
52: *
53: * @param Alpha\Util\Http\Request $request
54: *
55: * @since Alpha\Util\Http\Response
56: * @since 1.0
57: */
58: public function doHEAD($request);
59:
60: /**
61: * Handles GET HTTP requests.
62: *
63: * @param Alpha\Util\Http\Request $request
64: *
65: * @since Alpha\Util\Http\Response
66: * @since 1.0
67: */
68: public function doGET($params);
69:
70: /**
71: * Handles POST HTTP requests.
72: *
73: * @param Alpha\Util\Http\Request $request
74: *
75: * @since Alpha\Util\Http\Response
76: * @since 1.0
77: */
78: public function doPOST($params);
79:
80: /**
81: * Handles PUT HTTP requests.
82: *
83: * @param Alpha\Util\Http\Request $request
84: *
85: * @since Alpha\Util\Http\Response
86: * @since 1.0
87: */
88: public function doPUT($params);
89:
90: /**
91: * Handles PATCH HTTP requests.
92: *
93: * @param Alpha\Util\Http\Request $request
94: *
95: * @since Alpha\Util\Http\Response
96: * @since 1.0
97: */
98: public function doPATCH($params);
99:
100: /**
101: * Handles DELETE HTTP requests.
102: *
103: * @param Alpha\Util\Http\Request $request
104: *
105: * @since Alpha\Util\Http\Response
106: * @since 1.0
107: */
108: public function doDELETE($params);
109:
110: /**
111: * Handles OPTIONS HTTP requests.
112: *
113: * @param Alpha\Util\Http\Request $request
114: *
115: * @since Alpha\Util\Http\Response
116: * @since 1.0
117: */
118: public function doOPTIONS($params);
119:
120: /**
121: * Handles TRACE HTTP requests.
122: *
123: * @param Alpha\Util\Http\Request $request
124: *
125: * @since Alpha\Util\Http\Response
126: * @since 2.0.2
127: */
128: public function doTRACE($params);
129: }
130: