/** * Register the autoloader in the spl autoloader * * @return void * @throws Exception If there was an error in registration */ public static function register() { if (self::$registered) { return; } self::$libDir = dirname(dirname(__FILE__)); if (false === spl_autoload_register(array('ILess_Autoloader', 'loadClass'))) { throw new Exception('Unable to register ILess_Autoloader::loadClass as an autoloading method.'); } self::$registered = true; }