class ClassLoader (View source)

Provides autoloading for concrete5 Typically getInstance() should be used rather than instantiating a new object.

\@package Concrete\Core\Foundation

Properties

static ClassLoader $instance
protected ClassLoaderInterface[] $loaders
protected $enableLegacyNamespace
protected $applicationNamespace

Methods

boolean
legacyNamespaceEnabled()

Returns the status of the legacy namespace

enableLegacyNamespace()

Set legacy namespaces to enabled. This method unsets and resets this loader.

disableLegacyNamespace()

Set legacy namespaces to disabled. This method unsets and resets this loader.

activateAutoloaders()

No description

reset()

No description

string
getApplicationNamespace()

No description

setApplicationNamespace(string $applicationNamespace)

No description

__construct($enableLegacyNamespace = false, $applicationNamespace = 'Application')

No description

enableAliasClassAutoloading()

Aliases concrete5 classes to shorter class name aliases.

setupLegacyAutoloading()

No description

setupCoreAutoloading()

No description

setupCoreSourceAutoloading()

No description

registerPackage($pkg)

No description

registerPackageController($pkgHandle)

No description

registerPackageCustomAutoloaders($pkg)

No description

static ClassLoader
getInstance()

Returns the ClassLoader instance.

enable()

No description

disable()

No description

Details

boolean legacyNamespaceEnabled()

Returns the status of the legacy namespace

Return Value

boolean

enableLegacyNamespace()

Set legacy namespaces to enabled. This method unsets and resets this loader.

disableLegacyNamespace()

Set legacy namespaces to disabled. This method unsets and resets this loader.

protected activateAutoloaders()

reset()

string getApplicationNamespace()

Return Value

string

setApplicationNamespace(string $applicationNamespace)

Parameters

string $applicationNamespace

__construct($enableLegacyNamespace = false, $applicationNamespace = 'Application')

Parameters

$enableLegacyNamespace
$applicationNamespace

protected enableAliasClassAutoloading()

Aliases concrete5 classes to shorter class name aliases.

IDEs will not recognize these classes by default. A symbols file can be generated to assist IDEs by running SymbolGenerator::render() via PHP or executing the command-line 'concrete/bin/concrete5 c5:ide-symbols

protected setupLegacyAutoloading()

protected setupCoreAutoloading()

setupCoreSourceAutoloading()

registerPackage($pkg)

Parameters

$pkg

registerPackageController($pkgHandle)

Parameters

$pkgHandle

registerPackageCustomAutoloaders($pkg)

Parameters

$pkg

static ClassLoader getInstance()

Returns the ClassLoader instance.

Return Value

ClassLoader

enable()

disable()