$module) { if (strpos($file, $module) === 0) return $module; } } /** * Register a path with the auto-loader. * * After registering the path, it will be checked similarly to the models and libraries directories. * * @param string $path * @return void */ public static function register_path($path) { static::$paths[] = rtrim($path, '/').'/'; } /** * Register an alias with the auto-loader. * * @param array $alias * @return void */ public static function register_alias($alias) { static::$aliases = array_merge(static::$aliases, $alias); } /** * Remove an alias from the auto-loader's list of aliases. * * @param string $alias * @return void */ public static function forget_alias($alias) { unset(static::$aliases[$alias]); } }