-
Notifications
You must be signed in to change notification settings - Fork 35
icms_Autoloader
Notice: Wiki was automatic generated from project sources as project API documentation. Do not edit manually!
ImpressCMS Autoloader
- Class name: icms_Autoloader
- Namespace:
protected array $globalRepositories = array()
Paths of known global repositories
- Visibility: protected
- This property is static.
protected array $imported = array()
Imported namespaces
- Visibility: protected
- This property is static.
protected bool $initialized = \false
Whether setup has already been called or not
- Visibility: protected
- This property is static.
void icms_Autoloader::setup()
Initialize the autoloader, and register its autoload method
- Visibility: public
- This method is static.
array icms_Autoloader::split(string class)
Split a fully qualified class name into Namespace and Local class name
Supports both PHP 5.3 proj\sub\Class and 5.2 proj_sub_Class naming convention.
- Visibility: public
- This method is static.
- class string
void icms_Autoloader::register(string path, string namespace)
Register/unregister a class repository
The autoload system will look for classes in all registered repositories one after the other.
- Visibility: public
- This method is static.
- path string - <p>Repository physical path</p>
- namespace string - <p>If specified, all classes of the repository belong to this namespace</p>
bool icms_Autoloader::import(string namespace, bool required)
Import a namespace global elements (constants and functions)
If a namespace has functions or constants, they must be put in a file called "namespace.php" that will be read by this function.
- Visibility: public
- This method is static.
- namespace string
- required bool - <p>Whether to throw an exception or not if the namespace file is not found</p>
bool icms_Autoloader::autoload(string class)
Locate and load the appropriate file, based on a class name
- Visibility: public
- This method is static.
- class string
mixed icms_Autoloader::classPath(string class, bool useIncludePath, mixed ext)
Attempt to find a class path by scanning registered repositories
- Visibility: public
- This method is static.
- class string - <p>Name of the class to find</p>
- useIncludePath bool - <p>If to search include paths too</p>
- ext mixed
mixed icms_Autoloader::registerLegacy(mixed class)
This function maps the legacy classes that were included in common.php and xoopsformloader.php Rather than including all the legacy files, this defines where PHP should look to use these classes It's ugly, but so was the code we're getting rid of
- Visibility: public
- This method is static.
- class mixed