Esempio n. 1
0
 /**
  * Determines whether the caching framework is initialized.
  * The caching framework could be disabled for the core but used by an extension.
  *
  * @return boolean True if caching framework is initialized
  */
 public static function isCachingFrameworkInitialized()
 {
     if (!self::$isCachingFrameworkInitialized && isset($GLOBALS['typo3CacheManager']) && $GLOBALS['typo3CacheManager'] instanceof \TYPO3\CMS\Core\Cache\CacheManager && isset($GLOBALS['typo3CacheFactory']) && $GLOBALS['typo3CacheFactory'] instanceof \TYPO3\CMS\Core\Cache\CacheFactory) {
         self::$isCachingFrameworkInitialized = TRUE;
     }
     return self::$isCachingFrameworkInitialized;
 }
Esempio n. 2
0
 /**
  * Resets the isCachingFrameworkInitialized state
  * Beware! This is not public API and necessary for edge cases in the install tool.
  *
  * @return void
  */
 public static function flagCachingFrameworkForReinitialization()
 {
     self::$isCachingFrameworkInitialized = FALSE;
     GeneralUtility::removeSingletonInstance('TYPO3\\CMS\\Core\\Cache\\CacheManager', self::$cacheManager);
     GeneralUtility::removeSingletonInstance('TYPO3\\CMS\\Core\\Cache\\CacheFactory', self::$cacheFactory);
     self::$cacheManager = NULL;
     self::$cacheFactory = NULL;
 }