miniMVC/index.php

54 lines
1.2 KiB
PHP
Raw Normal View History

2012-01-13 11:58:06 -05:00
<?php
/**
* MiniMVC
*
* Convention-based micro-framework for PHP
*
* @package miniMVC
2012-01-13 11:58:06 -05:00
* @author Timothy J. Warren
* @copyright Copyright (c) 2011 - 2012
* @link https://github.com/timw4mail/miniMVC
* @license http://philsturgeon.co.uk/code/dbad-license
*/
// --------------------------------------------------------------------------
/**
* miniMVC bootstrap file
*
* @package miniMVC
* @subpackage App
*/
// --------------------------------------------------------------------------
// 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')
{
error_reporting(-1);
}
2012-05-15 16:53:10 -04:00
else if(ENVIRONMENT == 'PRODUCTION')
{
error_reporting(0);
}
2012-01-13 11:58:06 -05:00
// Set the default paths
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-16 16:47:36 -04:00
init();
2012-01-13 11:58:06 -05:00
// End of index.php