change to dino mail address for auction cron
[namibia] / public / index.php
1 <?php
2 /**
3  * This makes our life easier when dealing with paths. Everything is relative
4  * to the application root now.
5  */
6 date_default_timezone_set('Africa/Johannesburg');
7 chdir(dirname(__DIR__));
8 //for maintenance purposes
9 //require_once('maintenance.html');
10 //die;
11 #-> Switching configs.
12 $isDev   = false;
13 $isStage = false;
14 $isLive  = false;
15 $brochure = getenv('BROCHURE_ENV');
16 switch (getenv('APPLICATION_ENV'))
17 {
18         case 'development':
19                         $isDev   = true;
20                         $appName = 'Bid4Cars (dev)';
21                         break;
22         case 'staging':
23                         $isStage = true;
24                         $appName = 'Bid4Cars (stage)';
25                         break;
26         default:
27                         $isLive  = true;
28                         $uname   = php_uname("n");
29                         $appName = 'Bid4Cars';
30                         if ('Production.localdomain' == $uname
31                                 || 'VodacomStage' == $uname)
32                         {
33                                 $isStage = true;
34                                 $appName = 'Bid4Cars (stage)';
35                         }
36                         if ('nrad.local' == $uname)
37                         {
38                                 $isDev = true;
39                                 $appName = 'Bid4Cars (dev)';
40                         }
41                         break;
42 }
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'))
50 {
51         newrelic_set_appname($appName);
52 }
53
54 // Setup autoloading
55 require 'init_autoloader.php';
56
57 // Run the application!
58 Zend\Mvc\Application::init(require 'config/application.config.php')->run();