TYPO3 CMS  TYPO3_6-2
Request.php
Go to the documentation of this file.
1 <?php
3 
23 
28  protected $objectManager;
29 
34 
38  protected $controllerCommandName = 'default';
39 
43  protected $controllerExtensionName = NULL;
44 
50  protected $arguments = array();
51 
55  protected $exceedingArguments = array();
56 
62  protected $dispatched = FALSE;
63 
68 
72  protected $command = NULL;
73 
77  protected $callingScript;
78 
82  public function setCallingScript($callingScript) {
83  $this->callingScript = $callingScript;
84  }
85 
89  public function getCallingScript() {
90  return $this->callingScript;
91  }
92 
99  public function setDispatched($flag) {
100  $this->dispatched = $flag ? TRUE : FALSE;
101  }
102 
112  public function isDispatched() {
113  return $this->dispatched;
114  }
115 
124 
125  $this->controllerExtensionName = $nameParts['extensionName'];
126  $this->controllerObjectName = $controllerObjectName;
127  $this->command = NULL;
128  }
129 
135  public function getControllerObjectName() {
137  }
138 
144  public function getControllerExtensionName() {
146  }
147 
156  public function setControllerCommandName($commandName) {
157  $this->controllerCommandName = $commandName;
158  $this->command = NULL;
159  }
160 
166  public function getControllerCommandName() {
168  }
169 
175  public function getCommand() {
176  if ($this->command === NULL) {
177  $this->command = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Command', $this->controllerObjectName, $this->controllerCommandName);
178  }
179  return $this->command;
180  }
181 
190  public function setArgument($argumentName, $value) {
191  if (!is_string($argumentName) || $argumentName === '') {
192  throw new \TYPO3\CMS\Extbase\Mvc\Exception\InvalidArgumentNameException('Invalid argument name.', 1300893885);
193  }
194  $this->arguments[$argumentName] = $value;
195  }
196 
204  public function setArguments(array $arguments) {
205  $this->arguments = $arguments;
206  }
207 
215  public function getArgument($argumentName) {
216  if (!isset($this->arguments[$argumentName])) {
217  throw new \TYPO3\CMS\Extbase\Mvc\Exception\NoSuchArgumentException('An argument "' . $argumentName . '" does not exist for this request.', 1300893886);
218  }
219  return $this->arguments[$argumentName];
220  }
221 
228  public function hasArgument($argumentName) {
229  return isset($this->arguments[$argumentName]);
230  }
231 
237  public function getArguments() {
238  return $this->arguments;
239  }
240 
248  $this->exceedingArguments = $exceedingArguments;
249  }
250 
261  public function getExceedingArguments() {
263  }
264 }
setArgument($argumentName, $value)
Definition: Request.php:190
static explodeObjectControllerName($controllerObjectName)
setArguments(array $arguments)
Definition: Request.php:204
setExceedingArguments(array $exceedingArguments)
Definition: Request.php:247
setControllerCommandName($commandName)
Definition: Request.php:156
setCallingScript($callingScript)
Definition: Request.php:82
setControllerObjectName($controllerObjectName)
Definition: Request.php:122