aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/elgglib.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2012-01-21 10:44:47 -0500
committerCash Costello <cash.costello@gmail.com>2012-01-21 10:44:47 -0500
commita2cfbdeb100324090ffe19d58aeb71c2def83ac8 (patch)
treeed6b95ea6f9e21101fc467ffe02caaea3eda5975 /engine/lib/elgglib.php
parentb6284c6e781275e7d545778fb9ae41ba9107bdaa (diff)
downloadelgg-a2cfbdeb100324090ffe19d58aeb71c2def83ac8.tar.gz
elgg-a2cfbdeb100324090ffe19d58aeb71c2def83ac8.tar.bz2
cleans up the boot process
Diffstat (limited to 'engine/lib/elgglib.php')
-rw-r--r--engine/lib/elgglib.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 38ae73d82..98e7af2a9 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -2056,6 +2056,33 @@ function elgg_walled_garden() {
}
/**
+ * Boots the engine
+ *
+ * 1. sets error handlers
+ * 2. connects to database
+ * 3. verifies the installation suceeded
+ * 4. loads application configuration
+ * 5. loads site configuration
+ *
+ * @access private
+ */
+function _elgg_engine_boot() {
+ // Register the error handlers
+ set_error_handler('_elgg_php_error_handler');
+ set_exception_handler('_elgg_php_exception_handler');
+
+ register_translations(dirname(dirname(dirname(__FILE__))) . "/languages/");
+
+ setup_db_connections();
+
+ verify_installation();
+
+ _elgg_load_application_config();
+
+ _elgg_load_site_config();
+}
+
+/**
* Elgg's main init.
*
* Handles core actions for comments, the JS pagehandler, and the shutdown function.
@@ -2178,6 +2205,7 @@ define('REFERRER', -1);
define('REFERER', -1);
elgg_register_event_handler('init', 'system', 'elgg_init');
+elgg_register_event_handler('boot', 'system', '_elgg_engine_boot', 1);
elgg_register_plugin_hook_handler('unit_test', 'system', 'elgg_api_test');
elgg_register_event_handler('init', 'system', 'add_custom_menu_items', 1000);