-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbootstrap.php
More file actions
executable file
·31 lines (28 loc) · 880 Bytes
/
bootstrap.php
File metadata and controls
executable file
·31 lines (28 loc) · 880 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
<?php
// bootstrap autoloader
spl_autoload_register(function ($class_name) {
if ($class_name) {
$file = __DIR__ .'/'.'src/' ;
$file .= str_replace('\\', '/', $class_name);
$file .=".php";
if (file_exists($file)) {
include $file;
}else{
$file = __DIR__ .'/'.'dependencies/react-php/src/' ;
$file .= str_replace('\\', '/', $class_name);
$file .=".php";
if (file_exists($file)) {
include $file;
}
}
}
});
/*
if (!class_exists('\SplClassLoader')) {
include __DIR__ . '/dependencies/spl-class-loader/SplClassLoader.php';
}
$classLoader = new \SplClassLoader('nsqphp', __DIR__ . '/src/');
$classLoader->register();
$classLoader = new \SplClassLoader('React', __DIR__ . '/dependencies/react-php/src/');
$classLoader->register();
*/