Autoloader
final class Autoloader extends Singleton
Autoloader class for managing multiple SPL autoload directories
Properties
| static protected Singleton[] | $_instances | from Singleton | |
| static protected array | $class_map | ||
| static protected array | $scanned_modules |
Methods
Protected constructor to prevent more than one instance of autoload directories from being created
Maybe initialize singleton instance and return the instance.
A short one-liner tool to get a ReflectionClass so we can get runtime info for the static class instance and not this abstract.
An alias function for linking our class search function to the SPL autoload list.
Read a module directory and cache class file locations.
Search for a class file via the cached class map.
Details
at line 41
final protected
__construct()
Protected constructor to prevent more than one instance of autoload directories from being created
in
Singleton at line 42
final static Singleton
instance(mixed $args = null)
Maybe initialize singleton instance and return the instance.
in
Singleton at line 63
final static array
get_instances()
Return a copy of the instances array.
in
Singleton at line 72
final protected ReflectionClass
get_class_reflection()
A short one-liner tool to get a ReflectionClass so we can get runtime info for the static class instance and not this abstract.
at line 54
static protected
register_spl_autoload_function()
An alias function for linking our class search function to the SPL autoload list.
at line 66
bool
add_module_directory(string $directory, array $includable_directories)
Read a module directory and cache class file locations.
at line 117
static
search_for_class_file(string $search_class)
Search for a class file via the cached class map.