-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathboot.php
More file actions
33 lines (28 loc) · 981 Bytes
/
boot.php
File metadata and controls
33 lines (28 loc) · 981 Bytes
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
<?php
use Scriptor\Core\Scriptor;
require __DIR__.'/imanager.php';
require __DIR__.'/data/settings/scriptor-config.php';
if (file_exists(__DIR__.'/data/settings/custom.scriptor-config.php')) {
$config = array_replace_recursive(
$config, include __DIR__.'/data/settings/custom.scriptor-config.php'
);
}
$corePath = __DIR__."/$config[admin_path]core/";
require $corePath.'scriptor.php';
require $corePath.'moduleInterface.php';
require $corePath.'module.php';
require $corePath.'page.php';
require $corePath.'pages.php';
require $corePath.'user.php';
require $corePath.'users.php';
require $corePath.'site.php';
require $corePath.'csrf.php';
spl_autoload_register(function ($pClassName) {
$basePath = 'Scriptor\Modules\\';
$pClassName = str_replace('\\', '/', str_replace($basePath, '', $pClassName));
$inclClass = __DIR__ . "/site/modules/$pClassName.php";
if (file_exists($inclClass)) {
include_once $inclClass;
}
});
Scriptor::build($config);