15479603
Alex Savenko
initialize
|
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
|
<?php
$loader = new Phalcon\Loader;
$loader->registerNamespaces([
'App' => __DIR__ . '/../../app/library/App'
]);
$loader->register();
require_once TESTS_PATH . '../vendor/autoload.php';
$di = new \PhalconRest\Di\FactoryDefault();
/**
* Config
*/
$di->setShared(
'config',
function () {
$configFile = require(TESTS_PATH . '_config/global.php');
return new Config($configFile);
}
);
return new \PhalconRest\Api($di);
|