-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcli-sample.php
More file actions
40 lines (33 loc) · 859 Bytes
/
cli-sample.php
File metadata and controls
40 lines (33 loc) · 859 Bytes
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
#!/usr/bin/env php
<?php
/**
* Created by PhpStorm.
* User: dwiagus
* Date: 29/12/16
* Time: 11:03
*/
use Symfony\Component\Console\Application;
use App\Commands\GenerateModel;
use APP\Commands\GenerateDatabase;
use App\Commands\GenerateModule;
use App\Commands\GenerateController;
use App\Commands\GenerateRouter;
use App\Commands\GenerateView;
require '../../vendor/autoload.php';
foreach (glob(__DIR__."/command/*.php") as $filename)
{
include $filename;
}
$application = new Application();
$application->add(new GenerateModule());
$application->add(new GenerateModel());
$application->add(new GenerateDatabase());
$application->add(new GenerateController());
$application->add(new GenerateView());
$application->add(new GenerateRouter());
try {
$application->run();
} catch(\Exception $e) {
echo $e->getMessage();
exit(255);
}