TYPO3  7.6
Static Public Member Functions | Static Protected Attributes | List of all members
ClassAliasMap Class Reference

Static Public Member Functions

static getClassNameForAlias ($classNameOrAlias)
 
static hasAliasMaps ()
 
static addAliasMap (array $aliasMap)
 
static setClassAliasLoader (ClassAliasLoader $classAliasLoader)
 

Static Protected Attributes

static $classAliasLoader
 

Detailed Description

This class is the only public API of this package (besides the composer.json configuration) Use the only method in cases described below.

Definition at line 17 of file ClassAliasMap.php.

Member Function Documentation

static addAliasMap ( array  $aliasMap)
static

Adds an alias map if the alias loader is registered, throws an exception otherwise.

Parameters
array$aliasMap
Exceptions
\RuntimeException

Definition at line 56 of file ClassAliasMap.php.

Referenced by ClassLoadingInformation\registerClassLoadingInformation().

static getClassNameForAlias (   $classNameOrAlias)
static

You can use this method in your code if you compare class names as strings and want to provide compatibility for that as well. The impact is pretty low and boils down to a method call. In case no aliases are present in the composer installation, the class name given is returned as is, because the vendor/autoload.php will not be rewritten and thus the static member of this class will not be set.

Parameters
string$classNameOrAlias
Returns
string

Definition at line 33 of file ClassAliasMap.php.

Referenced by ClassLoadingInformation\getClassNameForAlias().

static hasAliasMaps ( )
static

Whether or not alias maps are already registered

Returns
bool

Definition at line 45 of file ClassAliasMap.php.

static setClassAliasLoader ( ClassAliasLoader  $classAliasLoader)
static
Parameters
ClassAliasLoader$classAliasLoader

Definition at line 68 of file ClassAliasMap.php.

References ClassAliasMap\$classAliasLoader.

Member Data Documentation

$classAliasLoader
staticprotected

Definition at line 22 of file ClassAliasMap.php.

Referenced by ClassAliasMap\setClassAliasLoader().