TYPO3 CMS  TYPO3_6-2
RequestHandler.php
Go to the documentation of this file.
1 <?php
3 
22 
27  protected $objectManager;
28 
33  protected $dispatcher;
34 
39  protected $requestBuilder;
40 
46 
52  public function handleRequest() {
53  $commandLine = isset($_SERVER['argv']) ? $_SERVER['argv'] : array();
54  $callingScript = array_shift($commandLine);
55  if ($callingScript !== $_SERVER['_']) {
56  $callingScript = $_SERVER['_'] . ' ' . $callingScript;
57  }
58  $request = $this->requestBuilder->build($commandLine, $callingScript . ' extbase');
60  $response = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Response');
61  $this->dispatcher->dispatch($request, $response);
62  $response->send();
63  return $response;
64  }
65 
71  public function canHandleRequest() {
72  return $this->environmentService->isEnvironmentInCliMode();
73  }
74 
81  public function getPriority() {
82  return 100;
83  }
84 }