class JLoader


Located at : UKNOWVA_ROOT/libraries/loader.php

Static class to handle loading of libraries.

Methods

static boolean
import(string $key, string $base = null)

Loads a class from specified directories.

static void
discover(string $classPrefix, string $parentPath, boolean $force = true)

Method to discover classes of a given type in a given path.

static array
getClassList()

Method to get the list of registered classes and their respective file paths for the autoloader.

static void
register(string $class, string $path, bool $force = true)

Directly register a class to the autoload list.

static boolean
load(string $class)

Load the file for a class.

Details

at line 48
static boolean import(string $key, string $base = null)

Loads a class from specified directories.

Parameters

string $key The class name to look for (dot notation).
string $base Search this directory for the class.

Return Value

boolean True on success.

at line 112
static void discover(string $classPrefix, string $parentPath, boolean $force = true)

Method to discover classes of a given type in a given path.

Parameters

string $classPrefix The class name prefix to use for discovery.
string $parentPath Full path to the parent folder for the classes to discover.
boolean $force True to overwrite the autoload path value for the class if it already exists.

Return Value

void

at line 149
static array getClassList()

Method to get the list of registered classes and their respective file paths for the autoloader.

Return Value

array The array of class => path values for the autoloader.

at line 165
static void register(string $class, string $path, bool $force = true)

Directly register a class to the autoload list.

Parameters

string $class The class name to register.
string $path Full path to the file that holds the class to register.
bool $force True to overwrite the autoload path value for the class if it already exists.

Return Value

void

at line 189
static boolean load(string $class)

Load the file for a class.

Parameters

string $class The class to be loaded.

Return Value

boolean True on success