|
Erebot
latest
A modular IRC bot for PHP 5.3+
|
Autoloader for Erebot's classes and interfaces. More...
Static Public Member Functions | |
| static | getPaths () |
| static | initialize ($path=null, $mapfile=null) |
| static | load ($class) |
Static Protected Member Functions | |
| static | addMap ($mapfile) |
| static | addPath ($path) |
| static | isMapped ($class) |
| static | loadSuccessful ($class) |
| static | register () |
| static | updateMap ($class, $origin) |
Static Protected Attributes | |
| static | $map = array() |
| Array of classname-to-file mapping. | |
| static | $mapfile = null |
| Last classmap specified. | |
| static | $maps = array() |
| Array of class maps loaded. | |
| static | $paths = array() |
| Array of PEAR2 autoload paths registered. | |
| static | $registered = false |
| Whether the autoload class has been spl_autoload_register-ed. | |
| static | $unmapped = array() |
| Array of classes loaded automatically not in the map. | |
Autoloader for Erebot's classes and interfaces.
This autoloader is mainly the same as the one used by PEAR2 packages.
The documentation of this class has also been updated to use Doxygen commands instead of phpDocumentor ones.
Definition at line 15 of file Autoload.php.
|
staticprotected |
Add a classname-to-file map
| string | $mapfile | The filename of the classmap |
Definition at line 113 of file Autoload.php.
|
staticprotected |
Add a path
| string | $path | The directory to add to the set of PEAR2 paths |
Definition at line 84 of file Autoload.php.
|
static |
Return the array of paths PEAR2 autoload has registered
| array | Array of registered paths' names. |
Definition at line 299 of file Autoload.php.
|
static |
Initialize the PEAR2 autoloader
| string | $path | Directory path to register |
| string | $mapfile | Path to a classname-to-file map file. |
Definition at line 47 of file Autoload.php.
|
staticprotected |
Check if the class is already defined in a classmap
| string | $class | The class to look for |
| bool | TRUE if the class is already defined, FALSE otherwise. |
Definition at line 141 of file Autoload.php.
|
static |
Load a PEAR2 class
| string | $class | The class to load |
| bool | TRUE if the class could be loaded, FALSE otherwise. |
Definition at line 163 of file Autoload.php.
|
staticprotected |
Check if the requested class was loaded from the specified path
| string | $class | Name of the class or interface to test. |
| bool | TRUE if the class was successfully loaded, FALSE otherwise. |
Definition at line 256 of file Autoload.php.
|
staticprotected |
Register the PEAR2 autoload class with spl_autoload_register
Definition at line 60 of file Autoload.php.
|
staticprotected |
If possible, update the classmap file with newly-discovered mapping.
| string | $class | Class name discovered |
| string | $origin | File where class was found |
Definition at line 278 of file Autoload.php.