TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\Core\ClassLoadingInformation Class Reference

Static Public Member Functions

static isClassLoadingInformationAvailable ()
 
static registerClassLoadingInformation ()
 
static getClassNameForAlias ($alias)
 

Public Attributes

const AUTOLOAD_INFO_DIR = 'typo3temp/autoload/'
 
const AUTOLOAD_INFO_DIR_TESTS = 'typo3temp/autoload-tests/'
 
const AUTOLOAD_CLASSMAP_FILENAME = 'autoload_classmap.php'
 
const AUTOLOAD_PSR4_FILENAME = 'autoload_psr4.php'
 
const AUTOLOAD_CLASSALIASMAP_FILENAME = 'autoload_classaliasmap.php'
 

Static Protected Member Functions

static getClassLoadingInformationDirectory ()
 
static ensureAutoloadInfoDirExists ()
 
static getClassLoader ()
 
static isTestingContext ()
 

Detailed Description

Get and manipulate class loading information, only necessary/in use when TYPO3 is not purely set up by composer but when e.g. extensions are installed via the extension manager by utilizing the composer class loader and adding more information built by the ClassLoadingInformationGenerator class.

Definition at line 31 of file ClassLoadingInformation.php.

Member Function Documentation

◆ ensureAutoloadInfoDirExists()

static TYPO3\CMS\Core\Core\ClassLoadingInformation::ensureAutoloadInfoDirExists ( )
staticprotected

Ensures the defined path for class information files exists And clears it in case we're in testing context

Definition at line 175 of file ClassLoadingInformation.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\mkdir_deep().

◆ getClassLoader()

static TYPO3\CMS\Core\Core\ClassLoadingInformation::getClassLoader ( )
staticprotected

Internal method calling the bootstrap to fetch the composer class loader

Returns
ClassLoader
Exceptions

Definition at line 189 of file ClassLoadingInformation.php.

References TYPO3\CMS\Core\Core\Bootstrap\getInstance().

◆ getClassLoadingInformationDirectory()

static TYPO3\CMS\Core\Core\ClassLoadingInformation::getClassLoadingInformationDirectory ( )
staticprotected
Returns
string

Definition at line 151 of file ClassLoadingInformation.php.

◆ getClassNameForAlias()

◆ isClassLoadingInformationAvailable()

static TYPO3\CMS\Core\Core\ClassLoadingInformation::isClassLoadingInformationAvailable ( )
static

Checks if the autoload_classmap.php exists and we are not in testing context. Used to see if the ClassLoadingInformationGenerator should be called.

Returns
bool

Definition at line 64 of file ClassLoadingInformation.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), and TYPO3\CMS\Core\Utility\GeneralUtility\writeFile().

Referenced by TYPO3\CMS\Core\Core\Bootstrap\baseSetup(), and TYPO3\CMS\Core\Core\Bootstrap\ensureClassLoadingInformationExists().

◆ isTestingContext()

static TYPO3\CMS\Core\Core\ClassLoadingInformation::isTestingContext ( )
staticprotected

Internal method calling the bootstrap to get application context information

Returns
bool
Exceptions

Definition at line 200 of file ClassLoadingInformation.php.

References TYPO3\CMS\Core\Core\Bootstrap\getInstance(), and TYPO3\CMS\Core\Package\PackageInterface\getValueFromComposerManifest().

◆ registerClassLoadingInformation()

static TYPO3\CMS\Core\Core\ClassLoadingInformation::registerClassLoadingInformation ( )
static

Registers the class aliases, the class maps and the PSR4 prefixes previously identified by the ClassLoadingInformationGenerator during runtime.

Definition at line 92 of file ClassLoadingInformation.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Referenced by TYPO3\CMS\Core\Core\Bootstrap\baseSetup(), and TYPO3\CMS\Core\Core\Bootstrap\ensureClassLoadingInformationExists().

Member Data Documentation

◆ AUTOLOAD_CLASSALIASMAP_FILENAME

const TYPO3\CMS\Core\Core\ClassLoadingInformation::AUTOLOAD_CLASSALIASMAP_FILENAME = 'autoload_classaliasmap.php'

Name of file that contains all class alias mappings

Definition at line 56 of file ClassLoadingInformation.php.

◆ AUTOLOAD_CLASSMAP_FILENAME

const TYPO3\CMS\Core\Core\ClassLoadingInformation::AUTOLOAD_CLASSMAP_FILENAME = 'autoload_classmap.php'

Name of file that contains all classes-filename mappings

Definition at line 46 of file ClassLoadingInformation.php.

◆ AUTOLOAD_INFO_DIR

const TYPO3\CMS\Core\Core\ClassLoadingInformation::AUTOLOAD_INFO_DIR = 'typo3temp/autoload/'

Base directory storing all autoload information

Definition at line 36 of file ClassLoadingInformation.php.

◆ AUTOLOAD_INFO_DIR_TESTS

const TYPO3\CMS\Core\Core\ClassLoadingInformation::AUTOLOAD_INFO_DIR_TESTS = 'typo3temp/autoload-tests/'

Base directory storing all autoload information in testing context

Definition at line 41 of file ClassLoadingInformation.php.

◆ AUTOLOAD_PSR4_FILENAME

const TYPO3\CMS\Core\Core\ClassLoadingInformation::AUTOLOAD_PSR4_FILENAME = 'autoload_psr4.php'

Name of file that contains all PSR4 mappings, fetched from the composer.json files of extensions

Definition at line 51 of file ClassLoadingInformation.php.