2 namespace TYPO3\CMS\Extbase\Scheduler;
84 $this->dispatcher = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\Dispatcher::class);
96 $this->request = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\Cli\Request::class);
97 $this->response = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\Cli\Response::class);
99 $this->configurationManager->setContentObject(\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class));
100 $this->configurationManager->setConfiguration($configuration);
102 $frameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
103 if (isset($frameworkConfiguration[
'objects'])) {
104 $objectContainer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\Container\Container::class);
105 foreach ($frameworkConfiguration[
'objects'] as $classNameWithDot => $classConfiguration) {
106 if (isset($classConfiguration[
'className'])) {
107 $originalClassName = rtrim($classNameWithDot,
'.');
108 $objectContainer->registerImplementation($originalClassName, $classConfiguration[
'className']);
113 $reflectionService = $this->objectManager->get(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class);
114 $reflectionService->setDataCache(\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Cache\CacheManager::class)->getCache(
'extbase_reflection'));
115 if (!$reflectionService->isInitialized()) {
116 $reflectionService->initialize();
131 $commandIdentifier = $task->getCommandIdentifier();
132 list($extensionKey, $controllerName, $commandName) = explode(
':', $commandIdentifier);
133 $extensionName = \TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($extensionKey);
134 $this->
initialize(array(
'extensionName' => $extensionName));
136 $command = $this->commandManager->getCommandByIdentifier($commandIdentifier);
137 $this->request->setControllerObjectName($command->getControllerClassName());
138 $this->request->setControllerCommandName($command->getControllerCommandName());
139 $this->request->setArguments($task->getArguments());
140 $this->dispatcher->dispatch($this->request, $this->response);
152 $persistenceManager = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class);
153 $persistenceManager->persistAll();
154 $reflectionService = $this->objectManager->get(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class);
155 $reflectionService->shutdown();