ClassLoadingInformation

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.

Internal

Table of Contents

Constants

AUTOLOAD_CLASSALIASMAP_FILENAME  = 'autoload_classaliasmap.php'
Name of file that contains all class alias mappings
AUTOLOAD_CLASSMAP_FILENAME  = 'autoload_classmap.php'
Name of file that contains all classes-filename mappings
AUTOLOAD_INFO_DIR  = 'autoload/'
Base directory storing all autoload information
AUTOLOAD_INFO_DIR_TESTS  = 'autoload-tests/'
Base directory storing all autoload information in testing context
AUTOLOAD_PSR4_FILENAME  = 'autoload_psr4.php'
Name of file that contains all PSR4 mappings, fetched from the composer.json files of extensions

Properties

$classLoader  : ClassLoader

Methods

dumpClassLoadingInformation()  : mixed
Puts all information compiled by the ClassLoadingInformationGenerator to files
getClassLoader()  : ClassLoader
Internal method calling the bootstrap to fetch the composer class loader
getClassNameForAlias()  : class-string
Get class name for alias
isClassLoadingInformationAvailable()  : bool
Checks if the autoload_classmap.php exists and we are not in testing context.
registerClassLoadingInformation()  : mixed
Registers the class aliases, the class maps and the PSR4 prefixes previously identified by the ClassLoadingInformationGenerator during runtime.
registerTransientClassLoadingInformationForPackage()  : mixed
Sets class loading information for a package for the current web request
setClassLoader()  : mixed
Sets the package manager instance
ensureAutoloadInfoDirExists()  : mixed
Ensures the defined path for class information files exists And clears it in case we're in testing context
getActiveExtensionPackages()  : array<string|int, PackageInterface>
Get all packages except the protected ones, as they are covered already
getClassLoadingInformationDirectory()  : string
isTestingContext()  : bool
Internal method calling the bootstrap to get application context information

Constants

AUTOLOAD_CLASSALIASMAP_FILENAME

Name of file that contains all class alias mappings

public mixed AUTOLOAD_CLASSALIASMAP_FILENAME = 'autoload_classaliasmap.php'

AUTOLOAD_CLASSMAP_FILENAME

Name of file that contains all classes-filename mappings

public mixed AUTOLOAD_CLASSMAP_FILENAME = 'autoload_classmap.php'

AUTOLOAD_INFO_DIR

Base directory storing all autoload information

public mixed AUTOLOAD_INFO_DIR = 'autoload/'

AUTOLOAD_INFO_DIR_TESTS

Base directory storing all autoload information in testing context

public mixed AUTOLOAD_INFO_DIR_TESTS = 'autoload-tests/'

AUTOLOAD_PSR4_FILENAME

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

public mixed AUTOLOAD_PSR4_FILENAME = 'autoload_psr4.php'

Properties

$classLoader

protected static ClassLoader $classLoader

Methods

dumpClassLoadingInformation()

Puts all information compiled by the ClassLoadingInformationGenerator to files

public static dumpClassLoadingInformation() : mixed

getClassLoader()

Internal method calling the bootstrap to fetch the composer class loader

public static getClassLoader() : ClassLoader
Internal

Currently used in TYPO3 testing. Public visibility is experimental and may vanish without further notice.

Return values
ClassLoader

getClassNameForAlias()

Get class name for alias

public static getClassNameForAlias(string $alias) : class-string
Parameters
$alias : string
Return values
class-string

isClassLoadingInformationAvailable()

Checks if the autoload_classmap.php exists and we are not in testing context.

public static isClassLoadingInformationAvailable() : bool

Used to see if the ClassLoadingInformationGenerator should be called.

Return values
bool

registerClassLoadingInformation()

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

public static registerClassLoadingInformation() : mixed

registerTransientClassLoadingInformationForPackage()

Sets class loading information for a package for the current web request

public static registerTransientClassLoadingInformationForPackage(PackageInterface $package) : mixed
Parameters
$package : PackageInterface
Tags
throws
Exception

setClassLoader()

Sets the package manager instance

public static setClassLoader(ClassLoader $classLoader) : mixed
Parameters
$classLoader : ClassLoader
Internal

ensureAutoloadInfoDirExists()

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

protected static ensureAutoloadInfoDirExists() : mixed

getActiveExtensionPackages()

Get all packages except the protected ones, as they are covered already

protected static getActiveExtensionPackages() : array<string|int, PackageInterface>
Return values
array<string|int, PackageInterface>

getClassLoadingInformationDirectory()

protected static getClassLoadingInformationDirectory() : string
Return values
string

isTestingContext()

Internal method calling the bootstrap to get application context information

protected static isTestingContext() : bool
Tags
throws
Exception
Return values
bool

        
On this page

Search results