Bootstrap the given application.

@param  \Illuminate\Contracts\Foundation\Application  $app
@return void
342547
public function bootstrap(Container $app)
    {
        foreach ($app->make('config')->get('app.providers') as $provider) {
            $app->register(new $provider($app));
        }
        
        foreach ($app->make('config')->get('app.theme.providers', []) as $provider) {
            $app->register(new $provider($app));
        }
    }
920014
public function bootModules(Application $app)
    {
        foreach ($this->getRegisteredModules() as $module) {
            $module->boot($app);
        }

        return $this;
    }
1261623
public function boot (Application $app) {
        if (isset($app[self::NS . ".default_args"]) && is_array($app[self::NS . ".default_args"])) {
            $this -> getPreserialiser($app) -> setDefaultArgs($app[self::NS . ".default_args"]);
        } else {
        }
    }
215394
public function boot()
    {
        $this->publishes([
            __DIR__ . '/../config/roles.php' => config_path('roles.php')
        ], 'config');
        
        $stub      = __DIR__ . '/../database/migrations/';
        $target    = database_path('migrations').'/';
        
        $this->publishes([
            $stub.'create_roles_table.php'     => $target . '2016_09_04_000000_create_roles_table.php',
            $stub.'create_role_user_table.php' => $target . '2016_09_04_100000_create_role_user_table.php'
        ], 'migrations');

        $this->publishes([
            __DIR__.'/../resources/views' => base_path('resources/views/vendor'),
        ], 'views');

        $this->registerBladeExtensions();
    }
856265
public function bootstrap($app)
    {
        /** @var Module $module */
        /** @var \yii\db\ActiveRecord $modelName */
        if ($app->hasModule('oauth2') && ($module = $app->getModule('oauth2')) instanceof Module) {
            if ($app instanceof \yii\console\Application) {
                $app->controllerMap[$module->id] = [
                    'class' => Oauth2Controller::className(),
                ];
            }
            /**
             * 注册语言包
             */
            if (!isset($app->get('i18n')->translations['oauth2*'])) {
                $app->get('i18n')->translations['oauth2*'] = [
                    'class' => PhpMessageSource::className(),
                    'sourceLanguage' => 'en-US',
                    'basePath' => __DIR__ . '/messages',
                ];
            }
        }
    }
745067
public function boot(Application $app)
    {
        AnnotationRegistry::registerAutoloadNamespace("Swagger\Annotations", $app["swagger.srcDir"]);

        if ($app["logger"]) {
            $logger = Logger::getInstance();
            $originalLog = $logger->log;
            $logger->log = function ($entry, $type) use ($app, $originalLog) {
                $app["logger"]->notice($entry);
                $originalLog($entry, $type);
            };
        }

        $app->get($app["swagger.apiDocPath"], new ResourceListController());
        $app->get("{$app["swagger.apiDocPath"]}/{service}", new ResourceDefinitionController());
    }
783894
public function boot(Application $app)
    {
        $this->strategies = $app['cors.strategies'];
        foreach ($this->strategies as &$strategy) {
            if (is_array($strategy)) {
                $strategy = new CrossOriginResourceSharingStrategy($strategy);
            }
            elseif (!$strategy instanceof CrossOriginResourceSharingStrategy) {
                throw new \InvalidArgumentException(
                    static::class . " must be constructed with array of " . CrossOriginResourceSharingStrategy::class
                );
            }
        }
        
        $app->before([$this, 'onPreRouting'], SilexKernel::BEFORE_PRIORITY_ROUTING + 1);
        $app->before([$this, 'onPostRouting'], SilexKernel::BEFORE_PRIORITY_CORS_PREFLIGHT);
        $app->after([$this, 'onResponse'], Application::LATE_EVENT);
        //$app->error([$this, 'onMethodNotAllowed'], Application::EARLY_EVENT);
        $app->error([$this, 'onMethodNotAllowedHttp'], Application::EARLY_EVENT);
    }
699756
public function bootstrap()
    {
        if ( ! $this->app->hasBeenBootstrapped())
            $this->app->bootstrapWith($this->bootstrappers);
        $this->app->loadDeferredProviders();
    }
1275876
public function boot(Application $app)
	{
		$assets = $this;
		$app->before(function(Request $request) use($app, $assets){
			$baseUrl = rtrim($request->getScheme().'://'.$request->getHttpHost().$request->getBasePath()).'/';
			$assets->setCoreUrl($baseUrl);
			$assets->setOption('baseUrl', $baseUrl);
			$assets->setOption('jsPosition',$assets::ON_BODY);
			return $assets;
		});

		// Registering preloaded options
		$options = isset($app['assets.options'])?$app['assets.options']:array();
		if(!empty($options))
			array_walk($options, function($optionValue, $optionName) use($assets){
				$assets->setOption($optionName, $optionValue);
			});	

		// Registering preloaded javascript files
		$js = isset($app['assets.js'])?$app['assets.js']:array();
		if(!empty($js))
			array_walk($js, function($value) use($assets){
				$assets->registerJs($value);
			});

		// Registering preloaded css files
		$css = isset($app['assets.css'])?$app['assets.css']:array();
		if(!empty($css))
			array_walk($css, function($value) use($assets){
				$assets->registerCss($value);
			});

		$app->after(function(Request $request, Response $response) use($app, $assets){
			// print_r($response->headers->get('content_type'));
			if($response->headers->get('content_type')!='application/json')
			{
				$content = $response->getContent();
				$assets->renderAssets($content);
				$response->setContent($content);
			}
			return $response;
		});
	}
1336634
public function boot(Application $app)
    {
        if (!$app instanceof SilexKernel) {
            throw new \LogicException(static::class . " can only be used with " . SilexKernel::class);
        }
        
        $app->addControllerInjectedArg($this->cookieContainer);
        $app->after(
            function (/** @noinspection PhpUnusedParameterInspection */
                Request $request,
                Response $response) {
                foreach ($this->cookieContainer->getCookies() as $cookie) {
                    $response->headers->setCookie($cookie);
                }
            }
        );
    }
468956
public function boot()
    {
        self::$packagePath = dirname(__DIR__);

        $this->publishes(
            [
                self::$packagePath . '/config/repository.php' => config_path('repository.php'),
            ],
            'repository'
        );
    }
145991
public function bootstrap(Application $app)
    {
        if (app('antares.installed')) {
            //app('antares.license.response')->validate();
        }
        $this->setCurrentTheme($app);
        $this->setThemeResolver($app);
    }
1076142
public function boot($app)
    {
        if (!$this->isBooted) {
            $this->loadViews();
            $this->loadTranslations();
            $this->isBooted = true;
        }

        return $this;
    }
466338
public function bootstrap($app)
    {
        if ($app instanceof WebApplication) {
            $this->addUrlManagerRules($app);
            $this->setPodiumLogTarget($app);
        } elseif ($app instanceof ConsoleApplication) {
            $this->controllerNamespace = 'bizley\podium\console';
        }
    }
84157
public function bootstrap(Application $app)
    {
        /** @var Container $container */
        $container = $app->getContainer();

        $container->share('app', $app);
        $container->alias('app', Application::class);
        $container->alias('app', ApplicationInterface::class);

        $container->share('container', $container);

        $container->share('kernel.http', function () use ($container) {
            return $container->get(Kernel::class);
        });
        $container->alias('kernel.http', KernelInterface::class);

        $container->alias('router', Router::class);
        $container->alias('dispatcher', Dispatcher::class);
    }
280090
public function boot()
    {
        $this->registerRoutePatterns();
        $this->registerRoutes();

        /** @TODO Probably we can move this to routes file */
        Passport::routes();

        Passport::tokensExpireIn(Carbon::now()->addDays(15));

        Passport::refreshTokensExpireIn(Carbon::now()->addDays(30));

        Resource::withoutWrapping();

        $this->registerPolicies();
        $this->registerMigrations();
        $this->registerFactories();
        $this->registerMiddleware();
        $this->registerViews();
        $this->registerPublishes();
        $this->registerTranslations();
        $this->registerValidators();

        if (class_exists('Breadcrumbs')) {
            require __DIR__ . '/../../../routes/breadcrumbs.php';
        }
    }
913545
public function bootstrap($app)
    {
        // add trace
        Yii::beginProfile('LUYA Boostrap process profiling', __METHOD__);
        
        // register luya core translation message source
        if (!isset($app->i18n->translations['luya'])) {
            $app->i18n->translations['luya'] = [
                'class' => 'yii\i18n\PhpMessageSource',
                'basePath' => '@luya/messages',
            ];
        }
        
        $this->extractModules($app);
        $this->beforeRun($app);
        $this->registerComponents($app);
        $this->run($app);
        
        // end trace
        Yii::trace('End of the LUYA bootstraping process', __METHOD__);
        Yii::endProfile('LUYA Boostrap process profiling');
    }