-
Notifications
You must be signed in to change notification settings - Fork 1
/
realworld
46 lines (37 loc) · 1.16 KB
/
realworld
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
45
46
#!/usr/bin/env php
<?php
use Phalcon\Di\FactoryDefault;
error_reporting(E_ALL);
define('APP_PATH', __DIR__);
/*
|--------------------------------------------------------------------------
| Register The App Services
|--------------------------------------------------------------------------
|
| We need to register the app services in order to spin up Yarak. Be sure you
| have registered Yarak in the services file.
|
*/
try {
require_once APP_PATH . '/library/Bootstrap.php';
require_once APP_PATH . '/library/BootstrapTests.php';
/**
* We don't want a global scope variable for this
*/
(new \RealWorld\BootstrapTests())->run();
$di = \Phalcon\Di::getDefault();
/*
|--------------------------------------------------------------------------
| Handle The Incoming Commands
|--------------------------------------------------------------------------
|
| We'll get the Yarak kernel from the dependency injector and defer to it for
| command handling.
|
*/
$kernel = $di->getYarak();
$kernel->handle();
} catch (\Exception $e) {
echo $e->getMessage() . PHP_EOL . $e->getTraceAsString();
exit;
}