forked from OpenVK/openvk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.php
More file actions
29 lines (21 loc) · 796 Bytes
/
Copy pathbootstrap.php
File metadata and controls
29 lines (21 loc) · 796 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
<?php
declare(strict_types=1);
use Chandler\Extensions\ExtensionManager;
use Chandler\MVC\Routing\Router;
function bootstrap_openvk(bool $headless = false): void
{
require __DIR__ . "/vendor/autoload.php";
define("CHANDLER_ROOT", __DIR__);
define("OPENVK_ROOT", __DIR__);
chandler_init_yaml_cache();
$config = chandler_parse_yaml(__DIR__ . "/openvk.yml");
define("CHANDLER_ROOT_CONF", $config["chandler"]);
define("OPENVK_ROOT_CONF", $config);
ExtensionManager::registerBuiltin("openvk", __DIR__, [
"name" => "OpenVK",
"init" => "ovk-init.php",
]);
require_once __DIR__ . "/vendor/openvk/chandler/chandler/Bootstrap.php";
$bootstrap = new Bootstrap(__DIR__, false, __DIR__ . "/openvk.yml");
$bootstrap->ignite($headless);
}