Orpheus

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

Methods

__construct()

Constructor

public __construct() : mixed

__toString()

Get the string representation of the ClassLoader

public __toString() : string
Return values
string

get()

Get the active autoloader

public static get() : static
Return values
static

getClasses()

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
bool

loadClass()

Load class file

public loadClass(string $className) : void
Parameters
$className : string
Tags
throws
Exception

register()

Register object to the SPL

public register([bool $prepend = false ]) : void
Parameters
$prepend : bool = false

setClass()

Set the file path to the class

public setClass(string $className, string $classPath) : bool
Parameters
$className : string
$classPath : string
Tags
throws
Exception
Return values
bool

unregister()

Unregister object from the SPL

public unregister() : void

							
On this page

Search results