Documentation

CRM_Extension_ClassLoader
in package

Class CRM_Extension_ClassLoader

Table of Contents

Constants

FEATURES  = ',psr0,psr4,'
List of class-loader features that are valid in this version of Civi.

Properties

$container  : CRM_Extension_Container_Interface
$loader  : ClassLoader
$manager  : CRM_Extension_Manager
$mapper  : CRM_Extension_Mapper
$newExtensions  : array<string|int, mixed>
A list of recently-activated extensions. This list is retained even if some ill-advised part of the installer does a `ClassLoader::refresh()`.

Methods

__construct()  : mixed
CRM_Extension_ClassLoader constructor.
__destruct()  : mixed
buildClassLoader()  : ClassLoader
installExtension()  : void
Add a newly installed extension to the active classloader.
isRegistered()  : bool
refresh()  : mixed
register()  : CRM_Extension_ClassLoader
Registers this instance as an autoloader.
unregister()  : mixed
getCacheFile()  : string
loadExtension()  : void
Read the extension metadata configure a classloader.

Constants

FEATURES

List of class-loader features that are valid in this version of Civi.

public mixed FEATURES = ',psr0,psr4,'

This may be useful for some extensions which enable/disable polyfills based on environment.

Properties

$newExtensions

A list of recently-activated extensions. This list is retained even if some ill-advised part of the installer does a `ClassLoader::refresh()`.

private static array<string|int, mixed> $newExtensions = []

Methods

installExtension()

Add a newly installed extension to the active classloader.

public installExtension(CRM_Extension_Info $info, string $path) : void

NOTE: This is intended for use by CRM/Extension subsystem during installation.

Parameters
$info : CRM_Extension_Info
$path : string

isRegistered()

public isRegistered() : bool
Return values
bool

getCacheFile()

protected getCacheFile() : string
Return values
string

loadExtension()

Read the extension metadata configure a classloader.

private static loadExtension(ClassLoader $loader, CRM_Extension_Info $info, string $path) : void
Parameters
$loader : ClassLoader
$info : CRM_Extension_Info
$path : string

        
On this page

Search results