Elgg
Version 1.11
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
load.php
Go to the documentation of this file.
1
<?php
9
$lib_dir
= __DIR__ .
"/lib"
;
10
11
require_once
"$lib_dir/autoloader.php"
;
12
13
$autoload_path
= dirname(__DIR__) .
'/vendor/autoload.php'
;
14
$autoload_available
= include_once(
$autoload_path
);
15
if
(!
$autoload_available
) {
16
die(
"Couldn't include '$autoload_path'. Did you run `composer install`?"
);
17
}
18
19
// set up autoloading and DIC
20
_elgg_services
();
21
22
// load the rest of the library files from engine/lib/
23
// All on separate lines to make diffs easy to read + make it apparent how much
24
// we're actually loading on every page (Hint: it's too much).
25
$lib_files
= array(
26
// Needs to be loaded first to correctly bootstrap
27
'elgglib.php'
,
28
29
// The order of these doesn't matter, so keep them alphabetical
30
'access.php'
,
31
'actions.php'
,
32
'admin.php'
,
33
'annotations.php'
,
34
'cache.php'
,
35
'comments.php'
,
36
'configuration.php'
,
37
'cron.php'
,
38
'database.php'
,
39
'entities.php'
,
40
'extender.php'
,
41
'filestore.php'
,
42
'friends.php'
,
43
'group.php'
,
44
'input.php'
,
45
'languages.php'
,
46
'mb_wrapper.php'
,
47
'memcache.php'
,
48
'metadata.php'
,
49
'metastrings.php'
,
50
'navigation.php'
,
51
'notification.php'
,
52
'objects.php'
,
53
'output.php'
,
54
'pagehandler.php'
,
55
'pageowner.php'
,
56
'pam.php'
,
57
'plugins.php'
,
58
'private_settings.php'
,
59
'relationships.php'
,
60
'river.php'
,
61
'sessions.php'
,
62
'sites.php'
,
63
'statistics.php'
,
64
'system_log.php'
,
65
'tags.php'
,
66
'user_settings.php'
,
67
'users.php'
,
68
'upgrade.php'
,
69
'views.php'
,
70
'widgets.php'
,
71
72
// backward compatibility
73
'deprecated-1.7.php'
,
74
'deprecated-1.8.php'
,
75
'deprecated-1.9.php'
,
76
'deprecated-1.10.php'
,
77
);
78
79
// isolate global scope
80
call_user_func(
function
() use (
$lib_dir
,
$lib_files
) {
81
82
$setups = array();
83
84
// include library files, capturing setup functions
85
foreach
(
$lib_files
as $file) {
86
$setup = (require_once
"$lib_dir/$file"
);
87
88
if
($setup instanceof Closure) {
89
$setups[$file] = $setup;
90
}
91
}
92
93
$events =
_elgg_services
()->events;
94
$hooks =
_elgg_services
()->hooks;
95
96
// run setups
97
foreach
($setups as $func) {
98
$func($events, $hooks);
99
}
100
});
$lib_dir
$lib_dir
This file is used to make all of Elgg's code available without going through the boot process...
Definition:
load.php:9
$lib_files
$lib_files
Definition:
load.php:25
_elgg_services
_elgg_services()
Definition:
autoloader.php:14
$autoload_path
$autoload_path
Definition:
load.php:13
$autoload_available
$autoload_available
Definition:
load.php:14
Generated on Sat Dec 21 2024 00:00:50 for Elgg by
1.8.11