コード例 #1
0
ファイル: Start.php プロジェクト: nova-framework/app
// Enable HTTP Method Override
//--------------------------------------------------------------------------
Request::enableHttpMethodParameterOverride();
//--------------------------------------------------------------------------
// Enable Trusting Of X-Sendfile Type Header
//--------------------------------------------------------------------------
BinaryFileResponse::trustXSendfileTypeHeader();
//--------------------------------------------------------------------------
// Register The Core Service Providers
//--------------------------------------------------------------------------
$providers = $config['providers'];
$app->getProviderRepository()->load($app, $providers);
//--------------------------------------------------------------------------
// Additional Middleware On Application
//--------------------------------------------------------------------------
App::middleware('Shared\\Http\\ContentGuard', array($app['config']['app.debug']));
//--------------------------------------------------------------------------
// Register Booted Start Files
//--------------------------------------------------------------------------
$app->booted(function () use($app, $env) {
    //--------------------------------------------------------------------------
    // Intialize The Language API
    //--------------------------------------------------------------------------
    Language::initialize();
    //--------------------------------------------------------------------------
    // Load The Application Start Script
    //--------------------------------------------------------------------------
    $path = $app['path'] . DS . 'Boot' . DS . 'Global.php';
    if (is_readable($path)) {
        require $path;
    }
コード例 #2
0
ファイル: Config.php プロジェクト: ringmaster/microsite2
 public static function middleware(App $app)
 {
     $app->middleware('config', function (Response $response) {
         $response['config'] = Config::get_all();
     });
 }