autoload

autoload Class provided by System to Autoload Classes

package

SYSTEM

Methods

Autoloads a class. This function is registered against the PHP Environment.

autoload(string $class) : boolean
static

It is called from PHP if a new class is required.

Arguments

$class

string

Class to be autoloaded

Response

boolean

Returns true if successfull.

The autoload Feature. Searches within all registered file, folders and functions if a matching class can be found, respecting namespaces in the process.

autoload_(string $class, string $namespace = '') : boolean
static

Arguments

$class

string

Class to be autoloaded

$namespace

string

Namespace of the Request

Response

boolean

Returns true or false.

Get the Classname of a File by removing its extension and containing folders.

getClassFromFile(string $file) : string
static

Arguments

$file

string

Filepath to be reduced to classname

Response

string

Returns classname

Seperates Class and Namespace of a combined string.

getClassNamespaceFromClass(string $class) : array
static

Arguments

$class

string

Class including possible Namespaces

Response

array

Returns array(class,namespace).

Registers the Autoload Handler against the PHP Environment

register_autoload() : null
static

Response

null

Returns null

Registers a file to the autoload feature The file has to be named class.php

registerFile(string $file, string $namespace = '') : null
static

Arguments

$file

string

Filepath to be autoloaded from

$namespace

string

Namespace of the File

Response

null

Returns null.

Registers a folder to the autoload feature All Classes within that Folder can be loaded if the file is named: class.php

registerFolder(string $folder, string $namespace = '') : null
static

Arguments

$folder

string

Folderpath to be autoloaded from

$namespace

string

Namespace of the Folder

Response

null

Returns null.

Registers a function to the autoload feature

registerFunc(string $func, string $namespace = '') : null
static
todo

Does this work? Is it useful?

Arguments

$func

string

Function to be "autoloaded"

$namespace

string

Namespace of the Function

Response

null

Returns null.

Properties

array Registered Files Format array(class, namespace, file)

files : 
static

Type(s)

array Registered Folders Format array(class, namespace, folder)

folders : 
static

Type(s)

string Registered Func Format array(namespace, func)

func : 
static

Type(s)