48a4c72a6bc9afe5a96d08d5f6c7a06fccd1360a
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Mvc / Controller / ControllerContext.php
1 <?php
2 namespace TYPO3\CMS\Extbase\Mvc\Controller;
3
4 /***************************************************************
5 * Copyright notice
6 *
7 * (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
8 * All rights reserved
9 *
10 * This class is a backport of the corresponding class of FLOW3.
11 * All credits go to the v5 team.
12 *
13 * This script is part of the TYPO3 project. The TYPO3 project is
14 * free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * The GNU General Public License can be found at
20 * http://www.gnu.org/copyleft/gpl.html.
21 *
22 * This script is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * This copyright notice MUST APPEAR in all copies of the script!
28 ***************************************************************/
29 /**
30 * The controller context contains information from the controller
31 *
32 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
33 * @scope prototype
34 * @api
35 */
36 class ControllerContext {
37
38 /**
39 * @var \TYPO3\CMS\Extbase\Mvc\Request
40 */
41 protected $request;
42
43 /**
44 * @var \TYPO3\CMS\Extbase\Mvc\Response
45 */
46 protected $response;
47
48 /**
49 * @var \TYPO3\CMS\Extbase\Mvc\Controller\Arguments
50 */
51 protected $arguments;
52
53 /**
54 * @var \TYPO3\CMS\Extbase\Property\MappingResults
55 * @deprecated since Extbase 1.4.0, will be removed in Extbase 6.1
56 */
57 protected $argumentsMappingResults;
58
59 /**
60 * @var \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder
61 */
62 protected $uriBuilder;
63
64 /**
65 * @var \TYPO3\CMS\Extbase\Mvc\Controller\FlashMessages
66 */
67 protected $flashMessageContainer;
68
69 /**
70 * Set the request of the controller
71 *
72 * @param \TYPO3\CMS\Extbase\Mvc\Request $request
73 * @return void
74 */
75 public function setRequest(\TYPO3\CMS\Extbase\Mvc\Request $request) {
76 $this->request = $request;
77 }
78
79 /**
80 * Get the request of the controller
81 *
82 * @return \TYPO3\CMS\Extbase\Mvc\Request
83 * @api
84 */
85 public function getRequest() {
86 return $this->request;
87 }
88
89 /**
90 * Set the response of the controller
91 *
92 * @param \TYPO3\CMS\Extbase\Mvc\Response $response
93 * @return void
94 */
95 public function setResponse(\TYPO3\CMS\Extbase\Mvc\Response $response) {
96 $this->response = $response;
97 }
98
99 /**
100 * Get the response of the controller
101 *
102 * @return \TYPO3\CMS\Extbase\Mvc\Request
103 * @api
104 */
105 public function getResponse() {
106 return $this->response;
107 }
108
109 /**
110 * Set the arguments of the controller
111 *
112 * @param \TYPO3\CMS\Extbase\Mvc\Controller\Arguments $arguments
113 * @return void
114 */
115 public function setArguments(\TYPO3\CMS\Extbase\Mvc\Controller\Arguments $arguments) {
116 $this->arguments = $arguments;
117 }
118
119 /**
120 * Get the arguments of the controller
121 *
122 * @return \TYPO3\CMS\Extbase\Mvc\Controller\Arguments
123 * @api
124 */
125 public function getArguments() {
126 return $this->arguments;
127 }
128
129 /**
130 * Set the arguments mapping results of the controller
131 *
132 * @param \TYPO3\CMS\Extbase\Property\MappingResults $argumentsMappingResults
133 * @return void
134 * @deprecated since Extbase 1.4.0, will be removed in Extbase 6.1
135 */
136 public function setArgumentsMappingResults(\TYPO3\CMS\Extbase\Property\MappingResults $argumentsMappingResults) {
137 $this->argumentsMappingResults = $argumentsMappingResults;
138 }
139
140 /**
141 * Get the arguments mapping results of the controller
142 *
143 * @return \TYPO3\CMS\Extbase\Property\MappingResults
144 * @api
145 * @deprecated since Extbase 1.4.0, will be removed in Extbase 6.1
146 */
147 public function getArgumentsMappingResults() {
148 return $this->argumentsMappingResults;
149 }
150
151 /**
152 * Tx_Extbase_MVC_Web_Routing_UriBuilder $uriBuilder
153 *
154 * @param \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder $uriBuilder
155 * @return void
156 */
157 public function setUriBuilder(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder $uriBuilder) {
158 $this->uriBuilder = $uriBuilder;
159 }
160
161 /**
162 * @return \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder
163 * @api
164 */
165 public function getUriBuilder() {
166 return $this->uriBuilder;
167 }
168
169 /**
170 * Set the flash messages
171 *
172 * @param \TYPO3\CMS\Extbase\Mvc\Controller\FlashMessages $flashMessageContainer
173 * @return void
174 */
175 public function setFlashMessageContainer(\TYPO3\CMS\Extbase\Mvc\Controller\FlashMessages $flashMessageContainer) {
176 $this->flashMessageContainer = $flashMessageContainer;
177 }
178
179 /**
180 * Get the flash messages
181 *
182 * @return \TYPO3\CMS\Extbase\Mvc\Controller\FlashMessages
183 * @api
184 */
185 public function getFlashMessageContainer() {
186 return $this->flashMessageContainer;
187 }
188
189 }
190
191
192 ?>