TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
ClassLoadingInformation Class Reference

Static Public Member Functions

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

Public Attributes

const AUTOLOAD_INFO_DIR = 'typo3conf/autoload/'
 
const AUTOLOAD_INFO_DIR_TESTS = 'typo3conf/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

static 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 GeneralUtility\mkdir_deep().

static getClassLoader ( )
staticprotected

Internal method calling the bootstrap to fetch the composer class loader

Returns
ClassLoader
Exceptions
TYPO3

Definition at line 189 of file ClassLoadingInformation.php.

References Bootstrap\getInstance().

static getClassLoadingInformationDirectory ( )
staticprotected
Returns
string

Definition at line 151 of file ClassLoadingInformation.php.

static getClassNameForAlias (   $alias)
static
static 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.

Referenced by Bootstrap\baseSetup(), and Bootstrap\ensureClassLoadingInformationExists().

static isTestingContext ( )
staticprotected

Internal method calling the bootstrap to get application context information

Returns
bool
Exceptions
TYPO3

Definition at line 200 of file ClassLoadingInformation.php.

References Bootstrap\getInstance().

static 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.

Referenced by Bootstrap\baseSetup(), and Bootstrap\ensureClassLoadingInformationExists().

Member Data Documentation

const AUTOLOAD_CLASSALIASMAP_FILENAME = 'autoload_classaliasmap.php'

Name of file that contains all class alias mappings

Definition at line 56 of file ClassLoadingInformation.php.

const AUTOLOAD_CLASSMAP_FILENAME = 'autoload_classmap.php'

Name of file that contains all classes-filename mappings

Definition at line 46 of file ClassLoadingInformation.php.

const AUTOLOAD_INFO_DIR = 'typo3conf/autoload/'

Base directory storing all autoload information

Definition at line 36 of file ClassLoadingInformation.php.

const AUTOLOAD_INFO_DIR_TESTS = 'typo3conf/autoload-tests/'

Base directory storing all autoload information in testing context

Definition at line 41 of file ClassLoadingInformation.php.

const 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.