ClassAutoloader
final class ClassAutoloader (View source)
Constants
| private FLAG_NONE | 
                     
  | 
            
| private FLAG_MODIFIED_PSR4 | 
                     
  | 
            
| private MODIFIED_PSR4_SEGMENTS | 
                     
  | 
            
Properties
| static private ClassAutoloader|null | $instance | The singleton ClassAutoloader instance.  | 
                |
| private bool | $hooked | Is this instance in the autoload queue?  | 
                |
| private string | $coreDir | The absolute path to the core directory, always using '/' as directory separator and ending with '/'.  | 
                |
| private string | $coreStartingPointDir | The absolute path to the core starting point directory, always using '/' as directory separator and ending with '/'.  | 
                |
| private string | $applicationNamespace | The application namespace, with a trailing '\' and without a leading '\' (or an empty string if no namespace).  | 
                |
| private string | $applicationDir | The absolute path to the application directory, always using '/' as directory separator and ending with '/'.  | 
                |
| private string | $applicationStartingPointDir | The absolute path to the application starting point directory, always using '/' as directory separator and ending with '/'.  | 
                |
| private bool | $applicationLegacyNamespaceEnabled | Should we enable loading classes in the Application\Src namespace from the /application/src folder?  | 
                |
| private string | $packagesDir | The absolute path to the packages directory, always using '/' as directory separator and ending with '/'.  | 
                |
| private array | $aliases | Array keys are the aliases (without a leading '\'), array values are the actual classes (without a leading '\').  | 
                |
| private string[] | $requiredAliases | List of class aliases that must be autoloaded at boot time (without leading '\').  | 
                |
| private Package[]|null[] | $registeredPackages | List of registered packages.  | 
                |
| private array[] | $packageInfo | Details about the computed autoloading stuff for every package.  | 
                
Methods
No description
Reset this instance values to the default ones.
Get the singleton ClassAutoloader instance.
Ensure that this instance is in the autoload queue.
Remove this instance from the autoload queue.
Is this instance in the autoload queue?
Set the absolute path to the core directory.
Get the absolute path to the core directory, always using '/' as directory separator and ending with '/'.
Set the absolute path to the core starting point directory.
Get the absolute path to the core starting point directory, always using '/' as directory separator and ending with '/'.
Set the application namespace.
Get the application namespace, with a trailing '\' and without a leading '\' (or an empty string if no namespace).
Set the absolute path to the application directory.
Get the absolute path to the application directory, always using '/' as directory separator and ending with '/'.
Set the absolute path to the application starting point directory.
Get the absolute path to the application starting point directory, always using '/' as directory separator and ending with '/'.
Should we enable loading classes in the Application\Src namespace from the /application/src folder?
Should we enable loading classes in the Application\Src namespace from the /application/src folder?
Set the absolute path to the packages directory.
Ghe absolute path to the packages directory, always using '/' as directory separator and ending with '/'.
Register a package (given its handle).
Unregister a package (given its handle).
Add a class alias.
Add multiple class aliases.
Get the registered class aliases.
Get the of class aliases that must be autoloaded at boot time (without leading '\').
Load the class aliases that must be autoloaded at boot time.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
        
                            
    __construct()
        
    
    No description
        
                            ClassAutoloader
    reset(bool $aliasesToo = false, bool $packagesToo = false)
        
    
    Reset this instance values to the default ones.
        
                static            ClassAutoloader
    getInstance()
        
    
    Get the singleton ClassAutoloader instance.
        
                            ClassAutoloader
    hook(bool $prepend = false)
        
    
    Ensure that this instance is in the autoload queue.
        
                            ClassAutoloader
    unhook()
        
    
    Remove this instance from the autoload queue.
        
                            bool
    isHooked()
        
    
    Is this instance in the autoload queue?
        
                            ClassAutoloader
    setCoreDir(string $value)
        
    
    Set the absolute path to the core directory.
        
                            string
    getCoreDir()
        
    
    Get the absolute path to the core directory, always using '/' as directory separator and ending with '/'.
        
                            ClassAutoloader
    setCoreStartingPointDir(string $value)
        
    
    Set the absolute path to the core starting point directory.
        
                            string
    getCoreStartingPointDir()
        
    
    Get the absolute path to the core starting point directory, always using '/' as directory separator and ending with '/'.
        
                            ClassAutoloader
    setApplicationNamespace(string $value)
        
    
    Set the application namespace.
        
                            string
    getApplicationNamespace()
        
    
    Get the application namespace, with a trailing '\' and without a leading '\' (or an empty string if no namespace).
        
                            ClassAutoloader
    setApplicationDir(string $value)
        
    
    Set the absolute path to the application directory.
        
                            string
    getApplicationDir()
        
    
    Get the absolute path to the application directory, always using '/' as directory separator and ending with '/'.
        
                            ClassAutoloader
    setApplicationStartingPointDir(string $value)
        
    
    Set the absolute path to the application starting point directory.
        
                            string
    getApplicationStartingPointDir()
        
    
    Get the absolute path to the application starting point directory, always using '/' as directory separator and ending with '/'.
        
                            ClassAutoloader
    setApplicationLegacyNamespaceEnabled(bool $value)
        
    
    Should we enable loading classes in the Application\Src namespace from the /application/src folder?
        
                            bool
    isApplicationLegacyNamespaceEnabled()
        
    
    Should we enable loading classes in the Application\Src namespace from the /application/src folder?
        
                            ClassAutoloader
    setPackagesDir(string $value)
        
    
    Set the absolute path to the packages directory.
        
                            string
    getPackagesDir()
        
    
    Ghe absolute path to the packages directory, always using '/' as directory separator and ending with '/'.
        
                            ClassAutoloader
    registerPackageHandle(string $packageHandle)
        
    
    Register a package (given its handle).
        
                            ClassAutoloader
    registerPackageController(Package $packageController)
        
    
    Register a package (given its controller).
        
                            ClassAutoloader
    unregisterPackage(string $packageHandle)
        
    
    Unregister a package (given its handle).
        
                            ClassAutoloader
    addClassAlias(string $alias, string $actual, bool $requiredAtBoot = false)
        
    
    Add a class alias.
        
                            ClassAutoloader
    addClassAliases(array $aliases, bool $requiredAtBoot = false)
        
    
    Add multiple class aliases.
        
                            array
    getClassAliases()
        
    
    Get the registered class aliases.
        
                            string[]
    getRequiredAliases()
        
    
    Get the of class aliases that must be autoloaded at boot time (without leading '\').
        
                            ClassAutoloader
    autoloadAliasesAtBoot()
        
    
    Load the class aliases that must be autoloaded at boot time.
        
                            bool
    loadClass(string $class)
        
    
    No description
        
                        private    bool
    loadClassFromCore(string $class)
        
    
    No description
        
                        private    bool
    loadClassFromPackages(string $class)
        
    
    No description
        
                        private    bool
    loadClassFromApplication(string $class)
        
    
    No description
        
                        private    bool
    loadClassFromAliases(string $class)
        
    
    No description
        
                        private    bool
    loadLegacyClass(string $class)
        
    
    No description
        
                        private    Generator
    listPackagesInfo(string $class)
        
    
    No description
        
                        private    Generator
    listStandardPackageInfo(string $class, string $packageHandle)
        
    
    No description
        
                        private    array
    listCustomPackageInfo(string $packageHandle)
        
    
    No description
        
                        private    bool
    loadPSR4Class(string $class, string $namespacePrefix, string $directoryPrefix, int $flags = self::FLAG_NONE)
        
    
    No description
        
                        private    string
    findPSR4Class(string $class, string $namespacePrefix, string $directoryPrefix, int $flags)
        
    
    No description