xref: /dokuwiki/inc/load.php (revision 2dcde3047b0cbc7cb75b3d9f84fd05a217b7fced)
116905344SAndreas Gohr<?php
216905344SAndreas Gohr/**
316905344SAndreas Gohr * Load all internal libraries and setup class autoloader
416905344SAndreas Gohr *
516905344SAndreas Gohr * @author Andreas Gohr <andi@splitbrain.org>
616905344SAndreas Gohr */
716905344SAndreas Gohr
816905344SAndreas Gohr// setup class autoloader
916905344SAndreas Gohrspl_autoload_register('load_autoload');
1016905344SAndreas Gohr
1116905344SAndreas Gohr// require all the common libraries
1216905344SAndreas Gohr// for a e few of these order does matter
1316905344SAndreas Gohrrequire_once(DOKU_INC.'inc/IXR_Library.php');
1416905344SAndreas Gohrrequire_once(DOKU_INC.'inc/adLDAP.php');
1516905344SAndreas Gohrrequire_once(DOKU_INC.'inc/blowfish.php');
1616905344SAndreas Gohrrequire_once(DOKU_INC.'inc/feedcreator.class.php');
1716905344SAndreas Gohrrequire_once(DOKU_INC.'inc/geshi.php');
1816905344SAndreas Gohrrequire_once(DOKU_INC.'inc/actions.php');
1916905344SAndreas Gohrrequire_once(DOKU_INC.'inc/changelog.php');
2016905344SAndreas Gohrrequire_once(DOKU_INC.'inc/common.php');
2116905344SAndreas Gohrrequire_once(DOKU_INC.'inc/confutils.php');
2216905344SAndreas Gohrrequire_once(DOKU_INC.'inc/pluginutils.php');
2316905344SAndreas Gohrrequire_once(DOKU_INC.'inc/plugin.php');
2416905344SAndreas Gohrrequire_once(DOKU_INC.'inc/events.php');
2516905344SAndreas Gohrrequire_once(DOKU_INC.'inc/form.php');
2616905344SAndreas Gohrrequire_once(DOKU_INC.'inc/fulltext.php');
2716905344SAndreas Gohrrequire_once(DOKU_INC.'inc/html.php');
2816905344SAndreas Gohrrequire_once(DOKU_INC.'inc/httputils.php');
2916905344SAndreas Gohrrequire_once(DOKU_INC.'inc/indexer.php');
3016905344SAndreas Gohrrequire_once(DOKU_INC.'inc/infoutils.php');
3116905344SAndreas Gohrrequire_once(DOKU_INC.'inc/init.php');
3216905344SAndreas Gohrrequire_once(DOKU_INC.'inc/io.php');
3316905344SAndreas Gohrrequire_once(DOKU_INC.'inc/load.php');
3416905344SAndreas Gohrrequire_once(DOKU_INC.'inc/mail.php');
3516905344SAndreas Gohrrequire_once(DOKU_INC.'inc/media.php');
3616905344SAndreas Gohrrequire_once(DOKU_INC.'inc/pageutils.php');
3716905344SAndreas Gohrrequire_once(DOKU_INC.'inc/parserutils.php');
3816905344SAndreas Gohrrequire_once(DOKU_INC.'inc/search.php');
3916905344SAndreas Gohrrequire_once(DOKU_INC.'inc/subscription.php');
4016905344SAndreas Gohrrequire_once(DOKU_INC.'inc/template.php');
4116905344SAndreas Gohrrequire_once(DOKU_INC.'inc/toolbar.php');
4216905344SAndreas Gohrrequire_once(DOKU_INC.'inc/utf8.php');
4316905344SAndreas Gohrrequire_once(DOKU_INC.'inc/auth.php');
4416905344SAndreas Gohr
4516905344SAndreas Gohr/**
4616905344SAndreas Gohr * spl_autoload_register callback
4716905344SAndreas Gohr *
4816905344SAndreas Gohr * Contains a static list of DokuWiki's core classes and automatically
49*2dcde304SAndreas Gohr * require()s their associated php files when an object is instantiated.
5016905344SAndreas Gohr *
5116905344SAndreas Gohr * @author Andreas Gohr <andi@splitbrain.org>
5216905344SAndreas Gohr * @todo   add generic loading of plugins here
5316905344SAndreas Gohr */
5416905344SAndreas Gohrfunction load_autoload($name){
5516905344SAndreas Gohr    static $classes = null;
5616905344SAndreas Gohr    if(is_null($classes)) $classes = array(
5716905344SAndreas Gohr        'DokuHTTPClient'        => DOKU_INC.'inc/HTTPClient.php',
5816905344SAndreas Gohr        'JSON'                  => DOKU_INC.'inc/JSON.php',
5916905344SAndreas Gohr        'adLDAP'                => DOKU_INC.'inc/adLDAP.php',
6016905344SAndreas Gohr        'Diff'                  => DOKU_INC.'inc/DifferenceEngine.php',
6116905344SAndreas Gohr        'UnifiedDiffFormatter'  => DOKU_INC.'inc/DifferenceEngine.php',
6216905344SAndreas Gohr        'TableDiffFormatter'    => DOKU_INC.'inc/DifferenceEngine.php',
6316905344SAndreas Gohr        'cache'                 => DOKU_INC.'inc/cache.php',
6416905344SAndreas Gohr        'cache_parser'          => DOKU_INC.'inc/cache.php',
6516905344SAndreas Gohr        'cache_instructions'    => DOKU_INC.'inc/cache.php',
6616905344SAndreas Gohr        'cache_renderer'        => DOKU_INC.'inc/cache.php',
6716905344SAndreas Gohr        'Doku_Event'            => DOKU_INC.'inc/events.php',
6816905344SAndreas Gohr        'Doku_Event_Handler'    => DOKU_INC.'inc/events.php',
6916905344SAndreas Gohr        'EmailAddressValidator' => DOKU_INC.'inc/EmailAddressValidator.php',
7016905344SAndreas Gohr        'JpegMeta'              => DOKU_INC.'inc/JpegMeta.php',
71*2dcde304SAndreas Gohr        'SimplePie'             => DOKU_INC.'inc/SimplePie.php',
7216905344SAndreas Gohr        'FeedParser'            => DOKU_INC.'inc/FeedParser.php',
7316905344SAndreas Gohr        'IXR_Server'            => DOKU_INC.'inc/IXR_Library.php',
7416905344SAndreas Gohr        'IXR_Client'            => DOKU_INC.'inc/IXR_Library.php',
7516905344SAndreas Gohr        'Doku_Plugin_Controller'=> DOKU_INC.'inc/plugincontroller.class.php',
7616905344SAndreas Gohr        'GeSHi'                 => DOKU_INC.'inc/geshi.php',
77*2dcde304SAndreas Gohr        'TarLib'                => DOKU_INC.'inc/TarLib.class.php',
78*2dcde304SAndreas Gohr        'ZibLib'                => DOKU_INC.'inc/ZipLib.class.php',
7916905344SAndreas Gohr    );
8016905344SAndreas Gohr
8116905344SAndreas Gohr    if(isset($classes[$name])){
8216905344SAndreas Gohr        require_once($classes[$name]);
8316905344SAndreas Gohr        return;
8416905344SAndreas Gohr    }
8516905344SAndreas Gohr}
8616905344SAndreas Gohr
87