CRM_Core_ClassLoader
in package
Tags
Table of Contents
Properties
- $_registered : bool
- Has this been registered already.
- $_singleton : object
- We only need one instance of this object. So we use the singleton pattern and cache the instance in this variable
- $civiTestClasses : array<string|int, mixed>
- The classes in CiviTest have ucky, non-standard naming.
Methods
- loadClass() : mixed
- register() : mixed
- Registers this instance as an autoloader.
- singleton() : object
- __construct() : mixed
- Class constructor.
- requireComposerAutoload() : void
- Requires the autoload.php generated by composer
Properties
$_registered
Has this been registered already.
protected
bool
$_registered
$_singleton
We only need one instance of this object. So we use the singleton pattern and cache the instance in this variable
private
static object
$_singleton
= \NULL
$civiTestClasses
The classes in CiviTest have ucky, non-standard naming.
private
array<string|int, mixed>
$civiTestClasses
Array(string $className => string $filePath).
Methods
loadClass()
public
loadClass(mixed $class) : mixed
Parameters
- $class : mixed
register()
Registers this instance as an autoloader.
public
register([bool $prepend = FALSE ]) : mixed
APIYes
Parameters
- $prepend : bool = FALSE
-
Whether to prepend the autoloader or not.
singleton()
public
static & singleton([bool $force = FALSE ]) : object
Parameters
- $force : bool = FALSE
Return values
object__construct()
Class constructor.
protected
__construct() : mixed
requireComposerAutoload()
Requires the autoload.php generated by composer
protected
requireComposerAutoload() : void