[CLEANUP] Adjust code to coding guidelines
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Mvc / RequestInterface.php
1 <?php
2 namespace TYPO3\CMS\Extbase\Mvc;
3
4 /***************************************************************
5 * Copyright notice
6 *
7 * This class is a backport of the corresponding class of TYPO3 Flow.
8 * All credits go to the TYPO3 Flow team.
9 * All rights reserved
10 *
11 * This script is part of the TYPO3 project. The TYPO3 project is
12 * free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * The GNU General Public License can be found at
18 * http://www.gnu.org/copyleft/gpl.html.
19 * A copy is found in the textfile GPL.txt and important notices to the license
20 * from the author is found in LICENSE.txt distributed with these scripts.
21 *
22 *
23 * This script is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
27 *
28 * This copyright notice MUST APPEAR in all copies of the script!
29 ***************************************************************/
30 /**
31 * Contract for a request.
32 *
33 * @api
34 */
35 interface RequestInterface {
36
37 /**
38 * Sets the dispatched flag
39 *
40 * @param boolean $flag If this request has been dispatched
41 * @return void
42 * @api
43 */
44 public function setDispatched($flag);
45
46 /**
47 * If this request has been dispatched and addressed by the responsible
48 * controller and the response is ready to be sent.
49 *
50 * The dispatcher will try to dispatch the request again if it has not been
51 * addressed yet.
52 *
53 * @return boolean TRUE if this request has been disptached successfully
54 * @api
55 */
56 public function isDispatched();
57
58 /**
59 * Returns the object name of the controller defined by the package key and
60 * controller name
61 *
62 * @return string The controller's Object Name
63 * @throws \TYPO3\CMS\Extbase\Mvc\Exception\NoSuchControllerException if the controller does not exist
64 * @api
65 */
66 public function getControllerObjectName();
67
68 /**
69 * Sets the value of the specified argument
70 *
71 * @param string $argumentName Name of the argument to set
72 * @param mixed $value The new value
73 * @return void
74 * @api
75 */
76 public function setArgument($argumentName, $value);
77
78 /**
79 * Sets the whole arguments array and therefore replaces any arguments
80 * which existed before.
81 *
82 * @param array $arguments An array of argument names and their values
83 * @return void
84 * @api
85 */
86 public function setArguments(array $arguments);
87
88 /**
89 * Returns the value of the specified argument
90 *
91 * @param string $argumentName Name of the argument
92 * @return string Value of the argument
93 * @throws \TYPO3\CMS\Extbase\Mvc\Exception\NoSuchArgumentException if such an argument does not exist
94 * @api
95 */
96 public function getArgument($argumentName);
97
98 /**
99 * Checks if an argument of the given name exists (is set)
100 *
101 * @param string $argumentName Name of the argument to check
102 * @return boolean TRUE if the argument is set, otherwise FALSE
103 * @api
104 */
105 public function hasArgument($argumentName);
106
107 /**
108 * Returns an array of arguments and their values
109 *
110 * @return array Array of arguments and their values (which may be arguments and values as well)
111 * @api
112 */
113 public function getArguments();
114 }
115
116 ?>