2012-01-13 11:58:06 -05:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* MiniMVC
|
|
|
|
*
|
|
|
|
* Convention-based micro-framework for PHP
|
|
|
|
*
|
2012-04-26 16:26:50 -04:00
|
|
|
* @package miniMVC
|
2012-01-13 11:58:06 -05:00
|
|
|
* @author Timothy J. Warren
|
|
|
|
* @copyright Copyright (c) 2011 - 2012
|
2012-05-23 12:01:13 -04:00
|
|
|
* @link https://github.com/aviat4ion/miniMVC
|
2012-07-12 10:23:55 -04:00
|
|
|
* @license http://philsturgeon.co.uk/code/dbad-license
|
2012-01-13 11:58:06 -05:00
|
|
|
*/
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------
|
2012-04-26 16:26:50 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* miniMVC bootstrap file
|
|
|
|
*
|
|
|
|
* @package miniMVC
|
|
|
|
* @subpackage App
|
|
|
|
*/
|
2012-07-12 10:23:55 -04:00
|
|
|
|
2012-04-26 16:26:50 -04:00
|
|
|
// --------------------------------------------------------------------------
|
2012-05-22 11:31:19 -04:00
|
|
|
|
|
|
|
namespace miniMVC;
|
2012-07-12 10:23:55 -04:00
|
|
|
|
2012-01-17 11:55:42 -05:00
|
|
|
// Set as either DEVELOPMENT or PRODUCTION
|
|
|
|
// DEVELOPMENT enables error reporting
|
|
|
|
// PRODUCTION disables error reporting
|
|
|
|
define('ENVIRONMENT', 'DEVELOPMENT');
|
2012-01-13 11:58:06 -05:00
|
|
|
|
2012-05-03 16:07:40 -04:00
|
|
|
if(ENVIRONMENT == 'DEVELOPMENT')
|
2012-01-17 11:55:42 -05:00
|
|
|
{
|
|
|
|
error_reporting(-1);
|
|
|
|
}
|
2012-05-15 16:53:10 -04:00
|
|
|
else if(ENVIRONMENT == 'PRODUCTION')
|
2012-01-17 11:55:42 -05:00
|
|
|
{
|
|
|
|
error_reporting(0);
|
|
|
|
}
|
2012-01-13 11:58:06 -05:00
|
|
|
|
|
|
|
// Set the default paths
|
2012-04-26 16:26:50 -04:00
|
|
|
define('MM_BASE_PATH', __DIR__);
|
|
|
|
define('MM_SYS_PATH', __DIR__.'/sys/');
|
|
|
|
define('MM_APP_PATH', __DIR__.'/app/');
|
2012-05-03 16:07:40 -04:00
|
|
|
define('MM_MOD_PATH', MM_APP_PATH.'modules/');
|
|
|
|
|
2012-05-17 16:22:39 -04:00
|
|
|
// Require the basic configuration file
|
|
|
|
require(MM_APP_PATH .'config/config.php');
|
2012-01-13 11:58:06 -05:00
|
|
|
|
|
|
|
// Require the most important files
|
2012-05-17 16:22:39 -04:00
|
|
|
require(MM_SYS_PATH . 'common.php');
|
2012-01-13 11:58:06 -05:00
|
|
|
|
|
|
|
// And away we go!
|
2012-05-22 11:31:19 -04:00
|
|
|
init();
|
2012-01-13 11:58:06 -05:00
|
|
|
|
2012-07-12 10:23:55 -04:00
|
|
|
// End of index.php
|