forked from Onyx-org/skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
console
executable file
·29 lines (21 loc) · 821 Bytes
/
console
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
#!/usr/bin/env php
<?php
require __DIR__ . '/vendor/autoload.php';
use Puzzle\Configuration\Yaml;
use Puzzle\Configuration\Stacked;
use Gaufrette\Filesystem;
use Gaufrette\Adapter\Local;
use __ONYX_Namespace\Application;
use __ONYX_Namespace\Console;
$defaultConfigurationFileStorage= new Filesystem(new Local(__DIR__ . '/config/built-in'));
$defaultConfiguration = new Yaml($defaultConfigurationFileStorage);
$localConfigurationFileStorage= new Filesystem(new Local(__DIR__ . '/config/local'));
$localConfiguration = new Yaml($localConfigurationFileStorage);
$configuration = new Stacked();
$configuration
->overrideBy($defaultConfiguration)
->overrideBy($localConfiguration);
$rootDir = realpath(__DIR__);
$app = new Application($configuration, $rootDir);
$console = new Console($app);
$console->run();