ClassLoader
in package
Official Orpheus class loader
Table of Contents
Properties
- $classes : array<string|int, mixed>
- The known class mapping
- $loader : ClassLoader
- The active autoloader
Methods
- __construct() : mixed
- Constructor
- __toString() : string
- Get the string representation of the ClassLoader
- get() : static
- Get the active autoloader
- getClasses() : array<string|int, mixed>
- Get the known classes
- isValid() : bool
- Check if active loader is valid
- loadClass() : void
- Load class file
- register() : void
- Register object to the SPL
- set() : void
- Set the active autoloader
- setClass() : bool
- Set the file path to the class
- unregister() : void
- Unregister object from the SPL
Properties
$classes
The known class mapping
protected
array<string|int, mixed>
$classes
$loader
The active autoloader
protected
static ClassLoader
$loader
Methods
__construct()
Constructor
public
__construct() : mixed
__toString()
Get the string representation of the ClassLoader
public
__toString() : string
Return values
stringget()
Get the active autoloader
public
static get() : static
Return values
staticgetClasses()
Get the known classes
public
getClasses() : array<string|int, mixed>
Return values
array<string|int, mixed>isValid()
Check if active loader is valid
public
static isValid() : bool
Return values
boolloadClass()
Load class file
public
loadClass(string $className) : void
Parameters
- $className : string
Tags
register()
Register object to the SPL
public
register([bool $prepend = false ]) : void
Parameters
- $prepend : bool = false
set()
Set the active autoloader
public
static set(ClassLoader $loader) : void
Parameters
- $loader : ClassLoader
setClass()
Set the file path to the class
public
setClass(string $className, string $classPath) : bool
Parameters
- $className : string
- $classPath : string
Tags
Return values
boolunregister()
Unregister object from the SPL
public
unregister() : void