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 12*05ed2c25SAndreas Gohr// for a few of these order does matter 1316905344SAndreas Gohrrequire_once(DOKU_INC.'inc/blowfish.php'); 1416905344SAndreas Gohrrequire_once(DOKU_INC.'inc/actions.php'); 1516905344SAndreas Gohrrequire_once(DOKU_INC.'inc/changelog.php'); 1616905344SAndreas Gohrrequire_once(DOKU_INC.'inc/common.php'); 1716905344SAndreas Gohrrequire_once(DOKU_INC.'inc/confutils.php'); 1816905344SAndreas Gohrrequire_once(DOKU_INC.'inc/pluginutils.php'); 1916905344SAndreas Gohrrequire_once(DOKU_INC.'inc/plugin.php'); 2016905344SAndreas Gohrrequire_once(DOKU_INC.'inc/events.php'); 2116905344SAndreas Gohrrequire_once(DOKU_INC.'inc/form.php'); 2216905344SAndreas Gohrrequire_once(DOKU_INC.'inc/fulltext.php'); 2316905344SAndreas Gohrrequire_once(DOKU_INC.'inc/html.php'); 2416905344SAndreas Gohrrequire_once(DOKU_INC.'inc/httputils.php'); 2516905344SAndreas Gohrrequire_once(DOKU_INC.'inc/indexer.php'); 2616905344SAndreas Gohrrequire_once(DOKU_INC.'inc/infoutils.php'); 2716905344SAndreas Gohrrequire_once(DOKU_INC.'inc/init.php'); 2816905344SAndreas Gohrrequire_once(DOKU_INC.'inc/io.php'); 2916905344SAndreas Gohrrequire_once(DOKU_INC.'inc/load.php'); 3016905344SAndreas Gohrrequire_once(DOKU_INC.'inc/mail.php'); 3116905344SAndreas Gohrrequire_once(DOKU_INC.'inc/media.php'); 3216905344SAndreas Gohrrequire_once(DOKU_INC.'inc/pageutils.php'); 3316905344SAndreas Gohrrequire_once(DOKU_INC.'inc/parserutils.php'); 3416905344SAndreas Gohrrequire_once(DOKU_INC.'inc/search.php'); 3516905344SAndreas Gohrrequire_once(DOKU_INC.'inc/subscription.php'); 3616905344SAndreas Gohrrequire_once(DOKU_INC.'inc/template.php'); 3716905344SAndreas Gohrrequire_once(DOKU_INC.'inc/toolbar.php'); 3816905344SAndreas Gohrrequire_once(DOKU_INC.'inc/utf8.php'); 3916905344SAndreas Gohrrequire_once(DOKU_INC.'inc/auth.php'); 4016905344SAndreas Gohr 4116905344SAndreas Gohr/** 4216905344SAndreas Gohr * spl_autoload_register callback 4316905344SAndreas Gohr * 4416905344SAndreas Gohr * Contains a static list of DokuWiki's core classes and automatically 452dcde304SAndreas Gohr * require()s their associated php files when an object is instantiated. 4616905344SAndreas Gohr * 4716905344SAndreas Gohr * @author Andreas Gohr <andi@splitbrain.org> 48*05ed2c25SAndreas Gohr * @todo add generic loading of plugins and other generically named classes 4916905344SAndreas Gohr */ 5016905344SAndreas Gohrfunction load_autoload($name){ 5116905344SAndreas Gohr static $classes = null; 5216905344SAndreas Gohr if(is_null($classes)) $classes = array( 5316905344SAndreas Gohr 'DokuHTTPClient' => DOKU_INC.'inc/HTTPClient.php', 5416905344SAndreas Gohr 'JSON' => DOKU_INC.'inc/JSON.php', 5516905344SAndreas Gohr 'adLDAP' => DOKU_INC.'inc/adLDAP.php', 5616905344SAndreas Gohr 'Diff' => DOKU_INC.'inc/DifferenceEngine.php', 5716905344SAndreas Gohr 'UnifiedDiffFormatter' => DOKU_INC.'inc/DifferenceEngine.php', 5816905344SAndreas Gohr 'TableDiffFormatter' => DOKU_INC.'inc/DifferenceEngine.php', 5916905344SAndreas Gohr 'cache' => DOKU_INC.'inc/cache.php', 6016905344SAndreas Gohr 'cache_parser' => DOKU_INC.'inc/cache.php', 6116905344SAndreas Gohr 'cache_instructions' => DOKU_INC.'inc/cache.php', 6216905344SAndreas Gohr 'cache_renderer' => DOKU_INC.'inc/cache.php', 6316905344SAndreas Gohr 'Doku_Event' => DOKU_INC.'inc/events.php', 6416905344SAndreas Gohr 'Doku_Event_Handler' => DOKU_INC.'inc/events.php', 6516905344SAndreas Gohr 'EmailAddressValidator' => DOKU_INC.'inc/EmailAddressValidator.php', 6616905344SAndreas Gohr 'JpegMeta' => DOKU_INC.'inc/JpegMeta.php', 672dcde304SAndreas Gohr 'SimplePie' => DOKU_INC.'inc/SimplePie.php', 6816905344SAndreas Gohr 'FeedParser' => DOKU_INC.'inc/FeedParser.php', 6916905344SAndreas Gohr 'IXR_Server' => DOKU_INC.'inc/IXR_Library.php', 7016905344SAndreas Gohr 'IXR_Client' => DOKU_INC.'inc/IXR_Library.php', 7116905344SAndreas Gohr 'Doku_Plugin_Controller'=> DOKU_INC.'inc/plugincontroller.class.php', 7216905344SAndreas Gohr 'GeSHi' => DOKU_INC.'inc/geshi.php', 732dcde304SAndreas Gohr 'TarLib' => DOKU_INC.'inc/TarLib.class.php', 742dcde304SAndreas Gohr 'ZibLib' => DOKU_INC.'inc/ZipLib.class.php', 75*05ed2c25SAndreas Gohr 'DokuWikiFeedCreator' => DOKU_INC.'inc/feedcreator.class.php', 76*05ed2c25SAndreas Gohr 'Doku_Parser_Mode' => DOKU_INC.'inc/parser/parser.php', 77c2a6d816SAndreas Gohr 78c2a6d816SAndreas Gohr 'DokuWiki_Action_Plugin' => DOKU_PLUGIN.'action.php', 79c2a6d816SAndreas Gohr 'DokuWiki_Admin_Plugin' => DOKU_PLUGIN.'admin.php', 80c2a6d816SAndreas Gohr 'DokuWiki_Syntax_Plugin' => DOKU_PLUGIN.'syntax.php', 81c2a6d816SAndreas Gohr 8216905344SAndreas Gohr ); 8316905344SAndreas Gohr 8416905344SAndreas Gohr if(isset($classes[$name])){ 8516905344SAndreas Gohr require_once($classes[$name]); 8616905344SAndreas Gohr return; 8716905344SAndreas Gohr } 8816905344SAndreas Gohr} 8916905344SAndreas Gohr 90