Created
February 24, 2014 10:05
-
-
Save kapv89/9184955 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use div\Std\App; | |
use div\Std\Http; | |
use div\Std\Jobs; | |
use Illuminate\Http\Request; | |
$app = new App('app', __DIR__.'/..', include 'config.php'); | |
$req = Request::createFromGlobals(); | |
$app->startErrorHandling() | |
->loadModules([ | |
'data', | |
'http' => ['type' => Http::class], | |
'jobs' => ['type' => Jobs::class] | |
]) | |
->init(function ($req) { | |
// set the default timezone (either from the config or UTC) | |
date_default_timezone_set($this->config('timezone', 'UTC')); | |
$res = $this['http']->handle($req); | |
$res->send(); | |
$this['http']->terminate($req, $res); | |
}) | |
->start([$req]) | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment