spoof
 All Data Structures Namespaces Files Functions Variables Pages
Autoload Class Reference

Static Public Member Functions

static import ($directory)
static remove ($directory)
static load ($class)

Static Protected Attributes

static $dirs = array()

Detailed Description

Autoload class

Provides flexible namespace-based loading rules for classes from multiple base directories.


Member Function Documentation

static import (   $directory)
static

Import directory

Adds given directory to current list of base directories.

Parameters:
string$directorydirectory to add
static load (   $class)
static

Load given class

Attempts to load given class. The class name has to contain full namespace path. This function will attempt to resolve the class path starting from each directory set with the import function. The first match will load the file and stop.

Parameters:
string$classfull class path including namespace
static remove (   $directory)
static

Remove directory

Removes given directory from current list of base directories.

Parameters:
string$directorydirectory to remove

Field Documentation

$dirs = array()
staticprotected

Internal storage for base directories


The documentation for this class was generated from the following file: