-
Notifications
You must be signed in to change notification settings - Fork 0
/
bow
executable file
·57 lines (48 loc) · 1.39 KB
/
bow
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
49
50
51
52
53
54
55
56
57
#!/usr/bin/env php
<?php
require __DIR__."/vendor/autoload.php";
/**
* Make kernel instance
*/
$kernel = \App\Kernel::configure(__DIR__.'/config');
/**
* Create command instance and set filename
*/
$setting = new \Bow\Console\Setting(__DIR__);
$setting->setNamespaces($kernel->namespaces());
/**
* Change preset destination
*/
$setting->setModelDirectory(__DIR__.'/app/Models');
$setting->setValidationDirectory(__DIR__.'/app/Validations');
$setting->setPackageDirectory(__DIR__.'/app/Configurations');
$setting->setControllerDirectory(__DIR__.'/app/Controllers');
$setting->setMiddlewareDirectory(__DIR__.'/app/Middlewares');
$setting->setMigrationDirectory(__DIR__.'/migrations');
$setting->setExceptionDirectory(__DIR__.'/app/Exceptions');
$setting->setServiceDirectory(__DIR__.'/app/Services');
$setting->setSeederDirectory(__DIR__.'/seeders');
$setting->setComponentDirectory(__DIR__.'/frontend');
$setting->setConfigDirectory(__DIR__.'/config');
$setting->setPublicDirectory(__DIR__.'/public');
/**
* Defines the local server starter
*/
$setting->setServerFilename(__DIR__.'/server.php');
$setting->setVarDirectory(__DIR__.'/var');
/**
* Create console instance
*/
$console = new \Bow\Console\Console($setting);
/**
* Bind kernel to console
*/
$console->bind($kernel);
/**
* Load the custom command application
*/
require __DIR__.'/routes/console.php';
/**
* Start console
*/
$console->run();