[TASK] Use fully qualified name resolution in PHP 5.5
[Packages/TYPO3.CMS.git] / typo3 / sysext / install / Classes / Controller / AbstractController.php
index 4296366..2c381ae 100644 (file)
@@ -42,7 +42,7 @@ class AbstractController {
         */
        protected function isInstallToolAvailable() {
                /** @var \TYPO3\CMS\Install\Service\EnableFileService $installToolEnableService */
-               $installToolEnableService = $this->objectManager->get('TYPO3\\CMS\\Install\\Service\\EnableFileService');
+               $installToolEnableService = $this->objectManager->get(\TYPO3\CMS\Install\Service\EnableFileService::class);
                if ($installToolEnableService->isFirstInstallAllowed()) {
                        return TRUE;
                }
@@ -62,11 +62,11 @@ class AbstractController {
                if (!$this->isInstallToolAvailable()) {
                        if (!EnableFileService::isFirstInstallAllowed() && !is_dir(PATH_typo3conf)) {
                                /** @var \TYPO3\CMS\Install\Controller\Action\ActionInterface $action */
-                               $action = $this->objectManager->get('TYPO3\\CMS\\Install\\Controller\\Action\\Common\\AccessNotAllowedAction');
+                               $action = $this->objectManager->get(\TYPO3\CMS\Install\Controller\Action\Common\AccessNotAllowedAction::class);
                                $action->setAction('accessNotAllowed');
                        } else {
                                /** @var \TYPO3\CMS\Install\Controller\Action\ActionInterface $action */
-                               $action = $this->objectManager->get('TYPO3\\CMS\\Install\\Controller\\Action\\Common\\InstallToolDisabledAction');
+                               $action = $this->objectManager->get(\TYPO3\CMS\Install\Controller\Action\Common\InstallToolDisabledAction::class);
                                $action->setAction('installToolDisabled');
                        }
                        $action->setController('common');
@@ -85,7 +85,7 @@ class AbstractController {
                        && (empty($GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword']))
                ) {
                        /** @var \TYPO3\CMS\Install\Controller\Action\ActionInterface $action */
-                       $action = $this->objectManager->get('TYPO3\\CMS\\Install\\Controller\\Action\\Common\\InstallToolPasswordNotSetAction');
+                       $action = $this->objectManager->get(\TYPO3\CMS\Install\Controller\Action\Common\InstallToolPasswordNotSetAction::class);
                        $action->setController('common');
                        $action->setAction('installToolPasswordNotSet');
                        $this->output($action->handle());
@@ -141,7 +141,7 @@ class AbstractController {
                                $this->redirect();
                        } else {
                                /** @var $message \TYPO3\CMS\Install\Status\ErrorStatus */
-                               $message = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\ErrorStatus');
+                               $message = $this->objectManager->get(\TYPO3\CMS\Install\Status\ErrorStatus::class);
                                $message->setTitle('Invalid form token');
                                $message->setMessage(
                                        'The form protection token was invalid. You have been logged out, please log in and try again.'
@@ -177,7 +177,7 @@ class AbstractController {
                        $this->redirect();
                } else {
                        /** @var $message \TYPO3\CMS\Install\Status\ErrorStatus */
-                       $message = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\ErrorStatus');
+                       $message = $this->objectManager->get(\TYPO3\CMS\Install\Status\ErrorStatus::class);
                        $message->setTitle('Session expired');
                        $message->setMessage(
                                'Your Install Tool session has expired. You have been logged out, please log in and try again.'
@@ -194,7 +194,7 @@ class AbstractController {
         */
        protected function loginForm(\TYPO3\CMS\Install\Status\StatusInterface $message = NULL) {
                /** @var \TYPO3\CMS\Install\Controller\Action\Common\LoginForm $action */
-               $action = $this->objectManager->get('TYPO3\\CMS\\Install\\Controller\\Action\\Common\\LoginForm');
+               $action = $this->objectManager->get(\TYPO3\CMS\Install\Controller\Action\Common\LoginForm::class);
                $action->setController('common');
                $action->setAction('login');
                $action->setToken($this->generateTokenForAction('login'));
@@ -226,7 +226,7 @@ class AbstractController {
                                } elseif (md5($password) === $installToolPassword) {
                                        // Update install tool password
                                        $saltFactory = \TYPO3\CMS\Saltedpasswords\Salt\SaltFactory::getSaltingInstance(NULL, 'BE');
-                                       $configurationManager = $this->objectManager->get('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager');
+                                       $configurationManager = $this->objectManager->get(\TYPO3\CMS\Core\Configuration\ConfigurationManager::class);
                                        $configurationManager->setLocalConfigurationValueByPath(
                                                'BE/installToolPassword',
                                                $saltFactory->getHashedPassword($password)
@@ -242,7 +242,7 @@ class AbstractController {
                                $saltFactory = \TYPO3\CMS\Saltedpasswords\Salt\SaltFactory::getSaltingInstance(NULL, 'BE');
                                $hashedPassword = $saltFactory->getHashedPassword($password);
                                /** @var $message \TYPO3\CMS\Install\Status\ErrorStatus */
-                               $message = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\ErrorStatus');
+                               $message = $this->objectManager->get(\TYPO3\CMS\Install\Status\ErrorStatus::class);
                                $message->setTitle('Login failed');
                                $message->setMessage('Given password does not match the install tool login password. ' .
                                        'Calculated hash: ' . $hashedPassword);
@@ -277,7 +277,7 @@ class AbstractController {
                $warningEmailAddress = $GLOBALS['TYPO3_CONF_VARS']['BE']['warning_email_addr'];
                if ($warningEmailAddress) {
                        /** @var \TYPO3\CMS\Core\Mail\MailMessage $mailMessage */
-                       $mailMessage = $this->objectManager->get('TYPO3\\CMS\\Core\\Mail\\MailMessage');
+                       $mailMessage = $this->objectManager->get(\TYPO3\CMS\Core\Mail\MailMessage::class);
                        $mailMessage
                                ->addTo($warningEmailAddress)
                                ->setSubject('Install Tool Login at \'' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . '\'')
@@ -301,7 +301,7 @@ class AbstractController {
                $warningEmailAddress = $GLOBALS['TYPO3_CONF_VARS']['BE']['warning_email_addr'];
                if ($warningEmailAddress) {
                        /** @var \TYPO3\CMS\Core\Mail\MailMessage $mailMessage */
-                       $mailMessage = $this->objectManager->get('TYPO3\\CMS\\Core\\Mail\\MailMessage');
+                       $mailMessage = $this->objectManager->get(\TYPO3\CMS\Core\Mail\MailMessage::class);
                        $mailMessage
                                ->addTo($warningEmailAddress)
                                ->setSubject('Install Tool Login ATTEMPT at \'' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . '\'')
@@ -348,7 +348,7 @@ class AbstractController {
         */
        protected function isInitialInstallationInProgress() {
                /** @var \TYPO3\CMS\Core\Configuration\ConfigurationManager $configurationManager */
-               $configurationManager = $this->objectManager->get('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager');
+               $configurationManager = $this->objectManager->get(\TYPO3\CMS\Core\Configuration\ConfigurationManager::class);
 
                $localConfigurationFileLocation = $configurationManager->getLocalConfigurationFileLocation();
                $localConfigurationFileExists = @is_file($localConfigurationFileLocation);
@@ -370,7 +370,7 @@ class AbstractController {
         */
        protected function initializeSession() {
                /** @var \TYPO3\CMS\Install\Service\SessionService $session */
-               $this->session = $this->objectManager->get('TYPO3\\CMS\\Install\\Service\\SessionService');
+               $this->session = $this->objectManager->get(\TYPO3\CMS\Install\Service\SessionService::class);
                if (!$this->session->hasSession()) {
                        $this->session->startSession();
                }