ClassLoadingInformationGenerator

readonly class \TYPO3\CMS\Core\Core\ClassLoadingInformationGenerator

Generates class loading information (class maps, class aliases etc.) and writes it to files for further inclusion in the bootstrap

Table of Contents

Methods

buildAutoloadInformationFiles()  : string[]
Generate the class map file
buildClassAliasMapFile()  : string
Build class alias mapping file
buildClassAliasMapForPackage()  : array
Returns class alias map for given package
buildClassLoadingInformationForPackage()  : array
Returns class loading information for a single package
createClassMap()  : array
Creates a class map for a given absolute path
getAutoloadSectionFromManifest()  : array
Fetches class loading info from the according section from the manifest file.
getPathCode()  : string
Generate a relative path string from a relative path
makePathRelative()  : string
Generate a relative path string from an absolute path within a give package path

Methods

buildAutoloadInformationFiles()

Generate the class map file

public buildAutoloadInformationFiles(bool $isDevMode, string $installationRoot, array $activeExtensionPackages) : string[]

Parameters

$isDevMode : bool
$installationRoot : string
$activeExtensionPackages : array

Return values

string[]

buildClassAliasMapFile()

Build class alias mapping file

public buildClassAliasMapFile(array $activeExtensionPackages) : string

Parameters

$activeExtensionPackages : array

Return values

string

buildClassLoadingInformationForPackage()

Returns class loading information for a single package

public buildClassLoadingInformationForPackage(PackageInterface $package, bool $useRelativePaths, bool $isDevMode, string $installationRoot) : array

Parameters

$package : PackageInterface
$useRelativePaths : bool

If set to TRUE, make the path relative to the current TYPO3 public web path

$isDevMode : bool
$installationRoot : string

Return values

array

createClassMap()

Creates a class map for a given absolute path

protected createClassMap(string $classesPath, bool $useRelativePaths, string $installationRoot[, bool $ignorePotentialTestClasses = false ][, string|null $namespace = null ]) : array

Parameters

$classesPath : string
$useRelativePaths : bool
$installationRoot : string
$ignorePotentialTestClasses : bool = false
$namespace : string|null = null

Return values

array

getAutoloadSectionFromManifest()

Fetches class loading info from the according section from the manifest file.

protected getAutoloadSectionFromManifest(stdClass $manifest, string $section, bool $isDevMode) : array

Development information will be extracted and merged as well.

Parameters

$manifest : stdClass
$section : string
$isDevMode : bool

Return values

array

getPathCode()

Generate a relative path string from a relative path

protected getPathCode(string $relativePathToClassFile) : string

Parameters

$relativePathToClassFile : string

Return values

string

makePathRelative()

Generate a relative path string from an absolute path within a give package path

protected makePathRelative(string $packagePath, string $realPathOfClassFile, string $installationRoot) : string

Parameters

$packagePath : string
$realPathOfClassFile : string
$installationRoot : string

Return values

string
On this page