meta/index.php

57 lines
1.2 KiB
PHP
Raw Normal View History

<?php
/**
* MiniMVC
*
* Convention-based micro-framework for PHP
*
* @package miniMVC
* @author Timothy J. Warren
* @copyright Copyright (c) 2011 - 2012
* @link https://github.com/aviat4ion/miniMVC
* @license http://philsturgeon.co.uk/code/dbad-license
*/
// --------------------------------------------------------------------------
/**
* miniMVC bootstrap file
*
* @package miniMVC
* @subpackage App
*/
// --------------------------------------------------------------------------
namespace miniMVC;
2015-06-04 15:46:30 -04:00
use \Whoops\Handler\PrettyPageHandler;
use \Whoops\Handler\JsonResponseHandler;
error_reporting(-1);
// Set the default paths
define('MM_BASE_PATH', __DIR__);
define('MM_SYS_PATH', __DIR__.'/sys/');
define('MM_APP_PATH', __DIR__.'/app/');
2015-06-04 14:30:42 -04:00
// Autoload vendors
require(MM_BASE_PATH . '/vendor/autoload.php');
// Require the basic configuration file
2015-06-04 14:30:42 -04:00
require(MM_APP_PATH . 'config/config.php');
// Require the most important files
require(MM_SYS_PATH . 'common.php');
2015-06-04 14:30:42 -04:00
// Start the autoloader
spl_autoload_register('miniMVC\autoload');
2015-06-04 15:46:30 -04:00
// Setup error handling
$whoops = new \Whoops\Run();
$defaultHandler = new PrettyPageHandler();
$whoops->pushHandler($defaultHandler);
// And away we go!
init();
// End of index.php