devel:autoloader
This is an old revision of the document!
Autoloader
DokuWiki registers its own autoloader early on in inc/load.php. When developing plugins you nearly never need to require any other files yourself.
Plugins components are automatically recognized by their naming scheme and file_structure. However those should always be loaded via plugin_load().
If you need additional classes, simply use the appropriate namespace as outlined below.
Namespaces
Because of DokuWiki's long history, most core files are not namespaced. Newer components however are.
DokuWiki registers the following namespaces for autoloading:
\dokuwiki\
- classes and subnamespaces are loaded frominc/*
\dokuwiki\plugin\
- classes are loaded fromlib/plugins/*
\dokuwiki\plugin\*\test\
- classes are loaded fromlib/plugins/*/_test/*
devel/autoloader.1478618808.txt.gz · Last modified: 2016-11-08 16:26 by andi