3 * This makes our life easier when dealing with paths. Everything is relative
4 * to the application root now.
6 date_default_timezone_set('Africa/Johannesburg');
7 chdir(dirname(__DIR__));
8 //for maintenance purposes
9 //require_once('maintenance.html');
11 #-> Switching configs.
15 $brochure = getenv('BROCHURE_ENV');
16 switch (getenv('APPLICATION_ENV'))
20 $appName = 'Bid4Cars (dev)';
24 $appName = 'Bid4Cars (stage)';
28 $uname = php_uname("n");
29 $appName = 'Bid4Cars';
30 if ('Production.localdomain' == $uname
31 || 'VodacomStage' == $uname)
34 $appName = 'Bid4Cars (stage)';
36 if ('nrad.local' == $uname)
39 $appName = 'Bid4Cars (dev)';
43 define('APP_KEY', 'namibia');
44 define('IS_BROCHURE', (!$brochure ? false : true));
45 define('BROCHURE_KEY', $brochure);
46 define('IS_DEV_ENV', $isDev);
47 define('IS_STAGE_ENV', $isStage);
48 define('IS_LIVE_ENV', $isLive);
49 if (extension_loaded('newrelic'))
51 newrelic_set_appname($appName);
55 require 'init_autoloader.php';
57 // Run the application!
58 Zend\Mvc\Application::init(require 'config/application.config.php')->run();