-
Notifications
You must be signed in to change notification settings - Fork 11
/
yarak
executable file
·48 lines (39 loc) · 1.22 KB
/
yarak
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
47
48
#!/usr/bin/env php
<?php
use Phalcon\Di\FactoryDefault;
error_reporting(E_ALL);
define('BASE_PATH', __DIR__);
define('APP_PATH', BASE_PATH . '/app');
/*
|--------------------------------------------------------------------------
| 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.
|
*/
$di = new FactoryDefault();
include APP_PATH . '/config/services.php';
$config = $di->getConfig();
/*
|--------------------------------------------------------------------------
| Autoload The Application
|--------------------------------------------------------------------------
|
| In order to work properly, Yarak will need both your project files and the
| vendor folder to be autoloaded.
|
*/
include APP_PATH . '/config/loader.php';
/*
|--------------------------------------------------------------------------
| 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();