forked from valentinbora/joobsbox-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
45 lines (33 loc) · 1.7 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
define('APPLICATION_DIRECTORY', dirname(__FILE__));
define('LIBRARY_DIRECTORY', dirname(__FILE__) . "/library");
define('CONFIG_LOCATION', APPLICATION_DIRECTORY . "/config/config.xml");
define('DB_CONFIG_LOCATION', APPLICATION_DIRECTORY . "/config/db.xml");
ini_set("include_path", APPLICATION_DIRECTORY . PATH_SEPARATOR . LIBRARY_DIRECTORY . PATH_SEPARATOR . ini_get("include_path"));
require "Joobsbox/Application/Development.php";
require "config/config.php";
require "config/router.php";
require "config/viewRenderer.php";
Zend_Controller_Front::getInstance()->setControllerDirectory(APPLICATION_DIRECTORY . '/Joobsbox/Controllers');
Zend_Registry::set("PluginLoader", new Joobsbox_Plugin_Loader);
Zend_Registry::set("EventHelper", new Joobsbox_Helpers_Event);
Zend_Registry::set("FilterHelper", new Joobsbox_Helpers_Filter);
Zend_Registry::set("TranslationHelper", new Joobsbox_Helpers_TranslationHash);
Zend_Registry::get("TranslationHelper")->regenerateHash();
require APPLICATION_DIRECTORY . "/Joobsbox/Application/ErrorHandler.php";
Zend_Controller_Action_HelperBroker::addPath(APPLICATION_DIRECTORY . '/Joobsbox/Helpers', 'Joobsbox_Helpers');
$front = Zend_Controller_Front::getInstance();
$front->setParam('disableOutputBuffering', true)->registerPlugin(new Joobsbox_Plugin_Controller);
configureTheme();
if(isset($joobsbox_render_var)) {
setLayout('integration');
if(isset($joobsbox_integration_text)) {
$viewRenderer->view->integrationText = $joobsbox_integration_text;
}
$front->returnResponse(true);
}
Zend_Registry::get("EventHelper")->fireEvent("joobsbox_init");
$response = $front->dispatch();
if(isset($joobsbox_render_var)) {
$joobsbox_render_var = $response->getBody();
}