pclib
3.0.0
Lightweight PHP framework
|
Simple autoloading of the classes. More...
Public Member Functions | |
autoload ($class) | |
Autoloading callback - do not use directly. | |
register () | |
Register autoloader. | |
unregister () | |
Unregister autoloader. | |
addDirectory ($directory, $options=array()) | |
Add directory, where search for the class will be performed. More... | |
addClasses (array $classes) | |
Add list of classes and corresponding files where classes are defined. More... | |
addAliases (array $aliases) | |
Add list of class aliases. More... | |
Simple autoloading of the classes.
Usually you will use default pclib autoloader: $pclib->autoloader. Features:
addAliases | ( | array | $aliases | ) |
Add list of class aliases.
array | $aliases | Array of className:aliasName pairs. |
addClasses | ( | array | $classes | ) |
Add list of classes and corresponding files where classes are defined.
array | $classes | Array of className:fileName pairs. |
addDirectory | ( | $directory, | |
$options = array() |
|||
) |
Add directory, where search for the class will be performed.
string | $directory | Directory path |
array | $options | Array of options, e.g.: ['namespace' => 'RootNamespace'] |