|
TYPO3 API
SVNRelease
|
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * 00005 * (c) 2009 Jochen Rau <jochen.rau@typoplanet.de> 00006 * All rights reserved 00007 * 00008 * This class is a backport of the corresponding class of FLOW3. 00009 * All credits go to the v5 team. 00010 * 00011 * This script is part of the TYPO3 project. The TYPO3 project is 00012 * free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU General Public License as published by 00014 * the Free Software Foundation; either version 2 of the License, or 00015 * (at your option) any later version. 00016 * 00017 * The GNU General Public License can be found at 00018 * http://www.gnu.org/copyleft/gpl.html. 00019 * 00020 * This script is distributed in the hope that it will be useful, 00021 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00023 * GNU General Public License for more details. 00024 * 00025 * This copyright notice MUST APPEAR in all copies of the script! 00026 ***************************************************************/ 00027 00028 /** 00029 * Contract for a request. 00030 * 00031 * @version $Id: RequestInterface.php 1729 2009-11-25 21:37:20Z stucki $ 00032 * @scope prototype 00033 * @api 00034 */ 00035 interface Tx_Extbase_MVC_RequestInterface { 00036 00037 /** 00038 * Sets the dispatched flag 00039 * 00040 * @param boolean $flag If this request has been dispatched 00041 * @return void 00042 * @api 00043 */ 00044 public function setDispatched($flag); 00045 00046 /** 00047 * If this request has been dispatched and addressed by the responsible 00048 * controller and the response is ready to be sent. 00049 * 00050 * The dispatcher will try to dispatch the request again if it has not been 00051 * addressed yet. 00052 * 00053 * @return boolean TRUE if this request has been disptached successfully 00054 * @api 00055 */ 00056 public function isDispatched(); 00057 00058 /** 00059 * Returns the object name of the controller defined by the package key and 00060 * controller name 00061 * 00062 * @return string The controller's Object Name 00063 * @throws Tx_Extbase_MVC_Exception_NoSuchController if the controller does not exist 00064 * @api 00065 */ 00066 public function getControllerObjectName(); 00067 00068 /** 00069 * Sets the extension name of the controller. 00070 * 00071 * @param string $extensionName The extension name. 00072 * @return void 00073 * @throws Tx_Extbase_MVC_Exception_InvalidPackageKey if the package key is not valid 00074 * @api 00075 */ 00076 public function setControllerExtensionName($extensionName); 00077 00078 /** 00079 * Returns the extension name of the specified controller. 00080 * 00081 * @return string The package key 00082 * @api 00083 */ 00084 public function getControllerExtensionName(); 00085 00086 /** 00087 * Sets the name of the controller which is supposed to handle the request. 00088 * Note: This is not the object name of the controller! 00089 * 00090 * @param string $controllerName Name of the controller 00091 * @return void 00092 * @api 00093 */ 00094 public function setControllerName($controllerName); 00095 00096 /** 00097 * Returns the object name of the controller supposed to handle this request, if one 00098 * was set already (if not, the name of the default controller is returned) 00099 * 00100 * @return string Object name of the controller 00101 * @api 00102 */ 00103 public function getControllerName(); 00104 00105 /** 00106 * Sets the name of the action contained in this request. 00107 * 00108 * Note that the action name must start with a lower case letter. 00109 * 00110 * @param string $actionName: Name of the action to execute by the controller 00111 * @return void 00112 * @throws Tx_Extbase_MVC_Exception_InvalidActionName if the action name is not valid 00113 * @api 00114 */ 00115 public function setControllerActionName($actionName); 00116 00117 /** 00118 * Returns the name of the action the controller is supposed to execute. 00119 * 00120 * @return string Action name 00121 * @author Robert Lemke <robert@typo3.org> 00122 * @api 00123 */ 00124 public function getControllerActionName(); 00125 00126 /** 00127 * Sets the value of the specified argument 00128 * 00129 * @param string $argumentName Name of the argument to set 00130 * @param mixed $value The new value 00131 * @return void 00132 * @api 00133 */ 00134 public function setArgument($argumentName, $value); 00135 00136 /** 00137 * Sets the whole arguments array and therefore replaces any arguments 00138 * which existed before. 00139 * 00140 * @param array $arguments An array of argument names and their values 00141 * @return void 00142 * @api 00143 */ 00144 public function setArguments(array $arguments); 00145 00146 /** 00147 * Returns the value of the specified argument 00148 * 00149 * @param string $argumentName Name of the argument 00150 * @return string Value of the argument 00151 * @throws Tx_Extbase_MVC_Exception_NoSuchArgument if such an argument does not exist 00152 * @api 00153 */ 00154 public function getArgument($argumentName); 00155 00156 /** 00157 * Checks if an argument of the given name exists (is set) 00158 * 00159 * @param string $argumentName Name of the argument to check 00160 * @return boolean TRUE if the argument is set, otherwise FALSE 00161 * @api 00162 */ 00163 public function hasArgument($argumentName); 00164 00165 /** 00166 * Returns an array of arguments and their values 00167 * 00168 * @return array Array of arguments and their values (which may be arguments and values as well) 00169 * @api 00170 */ 00171 public function getArguments(); 00172 00173 /** 00174 * Sets the requested representation format 00175 * 00176 * @param string $format The desired format, something like "html", "xml", "png", "json" or the like. 00177 * @return void 00178 * @api 00179 */ 00180 public function setFormat($format); 00181 00182 /** 00183 * Returns the requested representation format 00184 * 00185 * @return string The desired format, something like "html", "xml", "png", "json" or the like. 00186 * @api 00187 */ 00188 public function getFormat(); 00189 00190 /** 00191 * Set the request errors that occured during the request 00192 * 00193 * @param array $errors An array of Tx_Extbase_Error_Error objects 00194 * @return void 00195 * @api 00196 */ 00197 public function setErrors(array $errors); 00198 00199 /** 00200 * Get the request errors that occured during the request 00201 * 00202 * @return array An array of Tx_Extbase_Error_Error objects 00203 * @api 00204 */ 00205 public function getErrors(); 00206 00207 } 00208 ?>
1.8.0