forked from tighten/jigsaw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jigsaw
executable file
·33 lines (24 loc) · 931 Bytes
/
jigsaw
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
#!/usr/bin/env php
<?php
define('JIGSAW_START', microtime(true));
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
require __DIR__ . '/vendor/autoload.php';
}
if (file_exists(getcwd() . '/vendor/autoload.php')) {
require getcwd() . '/vendor/autoload.php';
}
$app = new TightenCo\Jigsaw\Container;
$app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class,
TightenCo\Jigsaw\Exceptions\Handler::class,
);
$app->bootstrapWith([
TightenCo\Jigsaw\Bootstrap\HandleExceptions::class,
]);
$application = new Symfony\Component\Console\Application('Jigsaw', '1.7.2');
$application->add($app[TightenCo\Jigsaw\Console\InitCommand::class]);
$application->add(new TightenCo\Jigsaw\Console\BuildCommand($app));
$application->add(new TightenCo\Jigsaw\Console\ServeCommand($app));
$application->setCatchExceptions(false);
TightenCo\Jigsaw\Jigsaw::addUserCommands($application, $app);
$application->run();