7 * @author Christian Weiske <cweiske@cweiske.de>
8 * @license http://www.gnu.org/licenses/agpl.html GNU AGPL v3
9 * @link http://cweiske.de/shpub.htm
14 * Class autoloader, PSR-0 compliant.
16 * @author Christian Weiske <cweiske@cweiske.de>
17 * @license http://www.gnu.org/licenses/agpl.html GNU AGPL v3
18 * @version Release: @package_version@
19 * @link http://cweiske.de/shpub.htm
24 * Load the given class
26 * @param string $class Class name
30 public function load($class)
32 $file = strtr($class, '_\\', '//') . '.php';
33 if (stream_resolve_include_path($file)) {
39 * Register this autoloader
43 public static function register()
46 get_include_path() . PATH_SEPARATOR . __DIR__ . '/../'
48 spl_autoload_register(array(new self(), 'load'));