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
$container
protected
CRM_Extension_Container_Interface
$container
$loader
protected
ClassLoader
$loader
$manager
protected
CRM_Extension_Manager
$manager
$mapper
protected
CRM_Extension_Mapper
$mapper
$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
__construct()
CRM_Extension_ClassLoader constructor.
public
__construct(CRM_Extension_Mapper $mapper, CRM_Extension_Container_Interface $container, CRM_Extension_Manager $manager) : mixed
Parameters
- $mapper : CRM_Extension_Mapper
- $container : CRM_Extension_Container_Interface
- $manager : CRM_Extension_Manager
__destruct()
public
__destruct() : mixed
buildClassLoader()
public
buildClassLoader() : ClassLoader
Tags
Return values
ClassLoaderinstallExtension()
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
boolrefresh()
public
refresh() : mixed
register()
Registers this instance as an autoloader.
public
register() : CRM_Extension_ClassLoader
Return values
CRM_Extension_ClassLoaderunregister()
public
unregister() : mixed
getCacheFile()
protected
getCacheFile() : string
Return values
stringloadExtension()
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