public function createApplication()
 {
     $app = new Application();
     $app['debug'] = true;
     $app->error(function (\Exception $e, $code) use($app) {
         return $app->json(['error' => $e->getMessage()], $code);
     });
     return $app->load();
 }
Пример #2
0
<?php

require_once __DIR__ . "/../vendor/autoload.php";
use Ihsw\Application;
$app = new Application();
$app->load()->run();