xref: /dokuwiki/inc/load.php (revision 16905344219a6293705b71cd526fad3ba07b04eb)
1*16905344SAndreas Gohr<?php
2*16905344SAndreas Gohr/**
3*16905344SAndreas Gohr * Load all internal libraries and setup class autoloader
4*16905344SAndreas Gohr *
5*16905344SAndreas Gohr * @author Andreas Gohr <andi@splitbrain.org>
6*16905344SAndreas Gohr */
7*16905344SAndreas Gohr
8*16905344SAndreas Gohr// setup class autoloader
9*16905344SAndreas Gohrspl_autoload_register('load_autoload');
10*16905344SAndreas Gohr
11*16905344SAndreas Gohr// require all the common libraries
12*16905344SAndreas Gohr// for a e few of these order does matter
13*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/DifferenceEngine.php');
14*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/EmailAddressValidator.php');
15*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/SimplePie.php');
16*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/FeedParser.php');
17*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/HTTPClient.php');
18*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/IXR_Library.php');
19*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/JSON.php');
20*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/JpegMeta.php');
21*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/TarLib.class.php');
22*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/ZipLib.class.php');
23*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/adLDAP.php');
24*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/blowfish.php');
25*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/feedcreator.class.php');
26*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/geshi.php');
27*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/actions.php');
28*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/cache.php');
29*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/changelog.php');
30*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/cliopts.php');
31*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/common.php');
32*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/confutils.php');
33*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/pluginutils.php');
34*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/plugin.php');
35*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/plugincontroller.class.php');
36*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/events.php');
37*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/form.php');
38*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/fulltext.php');
39*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/html.php');
40*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/httputils.php');
41*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/indexer.php');
42*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/infoutils.php');
43*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/init.php');
44*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/io.php');
45*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/load.php');
46*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/mail.php');
47*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/media.php');
48*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/pageutils.php');
49*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/parserutils.php');
50*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/search.php');
51*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/subscription.php');
52*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/template.php');
53*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/toolbar.php');
54*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/utf8.php');
55*16905344SAndreas Gohrrequire_once(DOKU_INC.'inc/auth.php');
56*16905344SAndreas Gohr
57*16905344SAndreas Gohr/**
58*16905344SAndreas Gohr * spl_autoload_register callback
59*16905344SAndreas Gohr *
60*16905344SAndreas Gohr * Contains a static list of DokuWiki's core classes and automatically
61*16905344SAndreas Gohr * requires their associated php files when an object is instantiated.
62*16905344SAndreas Gohr *
63*16905344SAndreas Gohr * @author Andreas Gohr <andi@splitbrain.org>
64*16905344SAndreas Gohr * @todo   add generic loading of plugins here
65*16905344SAndreas Gohr */
66*16905344SAndreas Gohrfunction load_autoload($name){
67*16905344SAndreas Gohr    static $classes = null;
68*16905344SAndreas Gohr    if(is_null($classes)) $classes = array(
69*16905344SAndreas Gohr        'DokuHTTPClient'        => DOKU_INC.'inc/HTTPClient.php',
70*16905344SAndreas Gohr        'DokuEvent'             => DOKU_INC.'inc/',
71*16905344SAndreas Gohr        'JSON'                  => DOKU_INC.'inc/JSON.php',
72*16905344SAndreas Gohr        'adLDAP'                => DOKU_INC.'inc/adLDAP.php',
73*16905344SAndreas Gohr        'Diff'                  => DOKU_INC.'inc/DifferenceEngine.php',
74*16905344SAndreas Gohr        'UnifiedDiffFormatter'  => DOKU_INC.'inc/DifferenceEngine.php',
75*16905344SAndreas Gohr        'TableDiffFormatter'    => DOKU_INC.'inc/DifferenceEngine.php',
76*16905344SAndreas Gohr        'cache'                 => DOKU_INC.'inc/cache.php',
77*16905344SAndreas Gohr        'cache_parser'          => DOKU_INC.'inc/cache.php',
78*16905344SAndreas Gohr        'cache_instructions'    => DOKU_INC.'inc/cache.php',
79*16905344SAndreas Gohr        'cache_renderer'        => DOKU_INC.'inc/cache.php',
80*16905344SAndreas Gohr        'Doku_Event'            => DOKU_INC.'inc/events.php',
81*16905344SAndreas Gohr        'Doku_Event_Handler'    => DOKU_INC.'inc/events.php',
82*16905344SAndreas Gohr        'Doku_Form'             => DOKU_INC.'inc/form.php',
83*16905344SAndreas Gohr        'EmailAddressValidator' => DOKU_INC.'inc/EmailAddressValidator.php',
84*16905344SAndreas Gohr        'JpegMeta'              => DOKU_INC.'inc/JpegMeta.php',
85*16905344SAndreas Gohr        'FeedParser'            => DOKU_INC.'inc/FeedParser.php',
86*16905344SAndreas Gohr        'utf8_entity_decoder'   => DOKU_INC.'inc/utf8.php',
87*16905344SAndreas Gohr        'IXR_Server'            => DOKU_INC.'inc/IXR_Library.php',
88*16905344SAndreas Gohr        'IXR_Client'            => DOKU_INC.'inc/IXR_Library.php',
89*16905344SAndreas Gohr        'Doku_Plugin_Controller'=> DOKU_INC.'inc/plugincontroller.class.php',
90*16905344SAndreas Gohr        'GeSHi'                 => DOKU_INC.'inc/geshi.php',
91*16905344SAndreas Gohr    );
92*16905344SAndreas Gohr
93*16905344SAndreas Gohr    if(isset($classes[$name])){
94*16905344SAndreas Gohr        require_once($classes[$name]);
95*16905344SAndreas Gohr        return;
96*16905344SAndreas Gohr    }
97*16905344SAndreas Gohr}
98*16905344SAndreas Gohr
99