This repository was archived by the owner on May 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
60 lines (53 loc) · 1.38 KB
/
Copy pathindex.php
File metadata and controls
60 lines (53 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/**
* Hauptdatei, die alle weiteren Funktionen aufruft und benötigte Dateien einbindet.
*
* @copyright Copyright 2013 Marcel Heisinger
* @link https://github.com/marhei/FeedSync
* @date 2013-05-07
* @license Apache License v2 (http://www.apache.org/licenses/LICENSE-2.0.txt)
* @author Marcel Heisinger
* @package FeedSync
**/
/**
* Wichtige Konstanten
**/
define('ROOT_PATH', __DIR__ .'/');
define('LIBARY_PATH', ROOT_PATH .'lib/');
define('TEMPLATE_PATH', ROOT_PATH .'tpl/');
define('LANGUAGE_PATH', ROOT_PATH .'lang/');
define('CONFIG_PATH', ROOT_PATH .'config.inc.php');
/**
* Timeout deaktivieren
**/
set_time_limit(0);
/**
* Fehlerbehandlung
**/
set_error_handler(function($errorNo, $errorString, $errorFile, $errorLine) {
// Fehler als Exception werfen
throw new \ErrorException($errorString, 0, $errorNo, $errorFile, $errorLine);
}, E_ALL);
/**
* Autoloading von Klassen
**/
spl_autoload_register(function($classname) {
// Pfadnamen basteln
$pathname = LIBARY_PATH.str_replace('\\', '/', $classname);
// Verschiedene Typen durchlaufen
foreach(array('class', 'interface', 'trait') as $current) {
// Dateinamen basteln
$filename = $pathname.'.'.$current.'.php';
// Wenn die Datei existiert diese auch einbinden
if(file_exists($filename)) require_once $filename;
}
});
/**
* Konfiguration einbinden
**/
require_once CONFIG_PATH;
/**
* Programm starten
**/
new \Main();
?>