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
|
<?php
if (is_file(__DIR__ . '/../vendor/autoload.php')) {
require __DIR__ . '/../vendor/autoload.php';
}
const PATH_LIB_CACHES = __DIR__ . '/../caches/';
const PATH_CACHE = __DIR__ . '/../cache/';
// Files
$files = [
__DIR__ . '/../lib/html.php',
__DIR__ . '/../lib/contents.php',
__DIR__ . '/../lib/php8backports.php',
__DIR__ . '/../lib/utils.php',
__DIR__ . '/../lib/http.php',
__DIR__ . '/../lib/logger.php',
__DIR__ . '/../lib/url.php',
__DIR__ . '/../lib/seotags.php',
// Vendor
__DIR__ . '/../lib/parsedown/Parsedown.php',
__DIR__ . '/../lib/php-urljoin/src/urljoin.php',
__DIR__ . '/../lib/simplehtmldom/simple_html_dom.php',
];
foreach ($files as $file) {
require_once $file;
}
spl_autoload_register(function ($className) {
$folders = [
__DIR__ . '/../actions/',
__DIR__ . '/../bridges/',
__DIR__ . '/../caches/',
__DIR__ . '/../formats/',
__DIR__ . '/../lib/',
__DIR__ . '/../middlewares/',
];
foreach ($folders as $folder) {
$file = $folder . $className . '.php';
if (is_file($file)) {
require $file;
}
}
});
|