[CLEANUP] Remove usage of self::class 25/39825/2
authorFrank Nägler <typo3@naegler.net>
Sat, 30 May 2015 13:42:16 +0000 (15:42 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 30 May 2015 17:51:48 +0000 (19:51 +0200)
This patch remove the usage of self::class and make use of __CLASS__
in context of methods like makeInstance. As array key, we use the
full qualified namespace followed by ::class.

Resolves: #67211
Releases: master
Change-Id: I60e5b33313a19cdef4705b04af892916923cc97c
Reviewed-on: http://review.typo3.org/39825
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/Resource/TextExtraction/TextExtractorRegistry.php
typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php
typo3/sysext/core/Classes/Type/File/FileInfo.php

index 7c5e159..b94ee4e 100644 (file)
@@ -1120,7 +1120,7 @@ class DataHandler {
                                                                                        $this->pagetreeNeedsRefresh = TRUE;
 
                                                                                        /** @var $tce DataHandler */
-                                                                                       $tce = GeneralUtility::makeInstance(self::class);
+                                                                                       $tce = GeneralUtility::makeInstance(__CLASS__);
                                                                                        $tce->stripslashes_values = 0;
                                                                                        // Setting up command for creating a new version of the record:
                                                                                        $cmd = array();
@@ -4397,7 +4397,7 @@ class DataHandler {
                                                // Remove child records (if synchronization requested it):
                                                if (is_array($removeArray) && count($removeArray)) {
                                                        /** @var DataHandler $tce */
-                                                       $tce = GeneralUtility::makeInstance(self::class);
+                                                       $tce = GeneralUtility::makeInstance(__CLASS__);
                                                        $tce->stripslashes_values = FALSE;
                                                        $tce->start(array(), $removeArray);
                                                        $tce->process_cmdmap();
@@ -4743,7 +4743,7 @@ class DataHandler {
                                                )
                                        )
                                );
-                               $dataHandler = GeneralUtility::makeInstance(self::class);
+                               $dataHandler = GeneralUtility::makeInstance(__CLASS__);
                                $dataHandler->stripslashes_values = FALSE;
                                $dataHandler->neverHideAtCopy = TRUE;
                                $dataHandler->start(array(), $command);
@@ -5167,7 +5167,7 @@ class DataHandler {
         * @return DataHandler
         */
        protected function getLocalTCE($stripslashesValues = FALSE, $dontProcessTransformations = TRUE) {
-               $copyTCE = GeneralUtility::makeInstance(self::class);
+               $copyTCE = GeneralUtility::makeInstance(__CLASS__);
                $copyTCE->stripslashes_values = $stripslashesValues;
                $copyTCE->copyTree = $this->copyTree;
                // Copy forth the cached TSconfig
index 05a6485..f37e07c 100644 (file)
@@ -46,7 +46,7 @@ class TextExtractorRegistry implements SingletonInterface {
         * @return TextExtractorRegistry
         */
        static public function getInstance() {
-               return GeneralUtility::makeInstance(self::class);
+               return GeneralUtility::makeInstance(__CLASS__);
        }
 
        /**
index a2a5c1f..a192e90 100644 (file)
@@ -469,7 +469,7 @@ class DatabaseTreeDataProvider extends AbstractTableConfigurationTreeDataProvide
                                GeneralUtility::deprecationLog(
                                        'Signal "TYPO3\\CMS\\Core\\Tree\\TableConfiguration\\TableConfiguration\\DatabaseTreeDataProvider" ' .
                                        'is deprecated but used by "' . $slotClassNameOrObject . '". ' .
-                                       'Please update signal name to "' . self::class . '".'
+                                       'Please update signal name to "' . __CLASS__ . '".'
                                );
                        }
                        $this->getSignalSlotDispatcher()->dispatch(
index cd803b3..aadf7b7 100644 (file)
@@ -43,10 +43,10 @@ class FileInfo extends \SplFileInfo implements TypeInterface {
                        }
                }
 
-               if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['mimeTypeGuessers'])
-                       && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['mimeTypeGuesser'])
+               if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Core\Type\File\FileInfo::class]['mimeTypeGuessers'])
+                       && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Core\Type\File\FileInfo::class]['mimeTypeGuesser'])
                ) {
-                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['mimeTypeGuesser'] as $mimeTypeGuesser) {
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Core\Type\File\FileInfo::class]['mimeTypeGuesser'] as $mimeTypeGuesser) {
                                $hookParameters = array(
                                        'mimeType' => &$mimeType
                                );