-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.php
37 lines (28 loc) · 1.16 KB
/
bootstrap.php
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
<?php
//define the application root
define('BASE', str_replace(array('\\', '\\\\'), '/', realpath('../')) . '/');
require_once BASE . 'vendor/composer/ClassLoader.php';
use Composer\Autoload\ClassLoader;
$autoLoader = new ClassLoader();
$autoLoader->setUseIncludePath(true);
$autoLoader->addPsr4('emilkm\\efxphp\\', BASE . 'src/');
$autoLoader->addPsr4('emilkm\\tests\\', BASE . 'tests/');
$autoLoader->addPsr4('flex\\messaging\\messages\\', BASE . 'src/Amf/flex/messaging/messages/');
if (file_exists(BASE . 'vendor/autoload.php')) {
$map = require BASE . 'vendor/composer/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
$autoLoader->set($namespace, $path);
}
$map = require BASE . 'vendor/composer/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$autoLoader->setPsr4($namespace, $path);
}
$classMap = require BASE . 'vendor/composer/autoload_classmap.php';
if ($classMap) {
$autoLoader->addClassMap($classMap);
}
}
$autoLoader->register(true);
//use emilkm\tests\util\PhpServer;
//$phpServer = new PhpServer('127.0.0.1', 9999, BASE . 'tests/webapp/public');
//$pid = $phpServer->start();