ClassLoadingInformationGenerator

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

Internal

Table of Contents

Properties

$activeExtensionPackages  : array<string|int, PackageInterface>
$classLoader  : ClassLoader
$installationRoot  : string
$isDevMode  : bool

Methods

__construct()  : mixed
buildAutoloadInformationFiles()  : array<string|int, string>
Generate the class map file
buildClassAliasMapFile()  : string
Build class alias mapping file
buildClassAliasMapForPackage()  : array<string|int, mixed>
Returns class alias map for given package
buildClassLoadingInformationForPackage()  : array<string|int, mixed>
Returns class loading information for a single package
createClassMap()  : array<string|int, mixed>
Creates a class map for a given (absolute) path
getAutoloadSectionFromManifest()  : array<string, array<string|int, mixed>>
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

Properties

$classLoader

protected ClassLoader $classLoader

$installationRoot

protected string $installationRoot

Methods

__construct()

public __construct(ClassLoader $classLoader, array<string|int, mixed> $activeExtensionPackages, string $installationRoot[, bool $isDevMode = false ]) : mixed
Parameters
$classLoader : ClassLoader
$activeExtensionPackages : array<string|int, mixed>
$installationRoot : string
$isDevMode : bool = false

buildAutoloadInformationFiles()

Generate the class map file

public buildAutoloadInformationFiles() : array<string|int, string>
Internal
Return values
array<string|int, string>

buildClassAliasMapFile()

Build class alias mapping file

public buildClassAliasMapFile() : string
Internal
Tags
throws
Exception
Return values
string

buildClassAliasMapForPackage()

Returns class alias map for given package

public buildClassAliasMapForPackage(PackageInterface $package) : array<string|int, mixed>
Parameters
$package : PackageInterface

The package to generate the class alias info for

Tags
throws
Exception
Return values
array<string|int, mixed>

buildClassLoadingInformationForPackage()

Returns class loading information for a single package

public buildClassLoadingInformationForPackage(PackageInterface $package[, bool $useRelativePaths = false ]) : array<string|int, mixed>
Parameters
$package : PackageInterface

The package to generate the class loading info for

$useRelativePaths : bool = false

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

Return values
array<string|int, mixed>

createClassMap()

Creates a class map for a given (absolute) path

protected createClassMap(string $classesPath[, bool $useRelativePaths = false ][, bool $ignorePotentialTestClasses = false ][, string $namespace = null ]) : array<string|int, mixed>
Parameters
$classesPath : string
$useRelativePaths : bool = false
$ignorePotentialTestClasses : bool = false
$namespace : string = null
Return values
array<string|int, mixed>

getAutoloadSectionFromManifest()

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

protected getAutoloadSectionFromManifest(stdClass $manifest, string $section) : array<string, array<string|int, mixed>>

Development information will be extracted and merged as well.

Parameters
$manifest : stdClass
$section : string
Return values
array<string, array<string|int, mixed>>

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[, bool $relativeToRoot = true ]) : string
Parameters
$packagePath : string
$realPathOfClassFile : string
$relativeToRoot : bool = true
Return values
string

        
On this page

Search results