24 lines
		
	
	
		
			No EOL
		
	
	
		
			798 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			No EOL
		
	
	
		
			798 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
set_error_handler(function ($errno, $errstr, $errfile, $errline) {
 | 
						|
	throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
 | 
						|
});
 | 
						|
 | 
						|
set_exception_handler(function ($exception) {
 | 
						|
	echo $exception->getMessage() . " on line " . $exception->getLine() . " in " . $exception->getFile() . PHP_EOL;
 | 
						|
	exit;
 | 
						|
});
 | 
						|
 | 
						|
if (!defined("PROJECT_DIR") ) {
 | 
						|
	define("PROJECT_DIR", rtrim( dirname(__FILE__ . "/../.."), "/"));
 | 
						|
}
 | 
						|
 | 
						|
if (!defined("SQLITE_DB")) {
 | 
						|
	throw new Exception("SQLITE_DB not defined");
 | 
						|
}
 | 
						|
 | 
						|
define("LIB_MIGRATIONS_DIR", dirname(__FILE__) . "/schema");
 | 
						|
define("LIB_TASKS_DIR", dirname(__FILE__) . "/tasks");
 | 
						|
define("LIB_TEMPLATE_DIR", dirname(__FILE__) . "/templates");
 | 
						|
define("LIB_LIB_DIR", dirname(__FILE__) . "/lib");
 | 
						|
 | 
						|
require_once(dirname(__FILE__) . "/Loader.php"); |