The StudipAutoloader takes care for automatically loading classes. You just have to provide it with a couple of paths where it may find the classes.
Example:
static register()
Definition: StudipAutoloader.php:39
static addAutoloadPath($path, $prefix='')
Definition: StudipAutoloader.php:64
◆ addAutoloadPath()
| static addAutoloadPath |
( |
|
$path, |
|
|
|
$prefix = '' |
|
) |
| |
|
static |
Adds another path to the list of paths where to search for classes. You may also pass an optional namespace prefix that indicates that class that start with this prefix are found in the given path.
- Parameters
-
| string | $path | the path to add |
| string | $prefix | the optional namespace prefix |
◆ loadClass()
| static loadClass |
( |
|
$class | ) |
|
|
static |
Loads the specified class or interface.
- Parameters
-
| string | $class | the name of the class |
- Returns
- bool|null true, if loaded, otherwise null
◆ register()
◆ removeAutoloadPath()
| static removeAutoloadPath |
( |
|
$path, |
|
|
|
$prefix = '' |
|
) |
| |
|
static |
Removes a path from the list of paths.
- Parameters
-
| string | $path | the path to remove |
| string | $prefix | the optional namespace prefix |
◆ unregister()
◆ $autoload_paths
| $autoload_paths = array() |
|
staticprotected |
The documentation for this class was generated from the following file: