Skip to content

Commit

Permalink
Add Loader::addSpecialClass
Browse files Browse the repository at this point in the history
  • Loading branch information
ginatrapani committed Mar 6, 2015
1 parent 548b64e commit 587e63e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions libs/class.Loader.php
Expand Up @@ -120,6 +120,18 @@ public static function getSpecialClasses() {
return self::$special_classes;
}

/**
* Add special class information for loading.
*
* @param str $class_name
* @param str $path full qualified path
*/
public static function addSpecialClass($class_name, $path) {
self::definePathConstants();
self::$special_classes[$class_name] = $path;
require_once($path);
}

/**
* The method registered to run on _autoload. When a class gets instantiated this method will be called to look up
* the class file if the class is not present. The second instantiation of the same class wouldn't call this method.
Expand Down

0 comments on commit 587e63e

Please sign in to comment.