Perform extra chores on boot

@param  Application $app
172566
public function boot(Application $app)
    {
        // Register Monolog error handler for fatal errors here because Symfony's handler overrides it
        $monologErrorHandler = new MonologErrorHandler($app['log']);

        $monologErrorHandler->registerErrorHandler();
        $monologErrorHandler->registerFatalHandler();
    }
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 {
        }
    }
1014365
protected function runCommandInBackground(Application $app)
    {
        chdir(dirname($app->request->getScriptFile()));
        exec($this->buildCommand());
    }
529854
final protected function resolveApplicationBindings($app): void
    {
        foreach ($this->overrideApplicationBindings($app) as $original => $replacement) {
            $app->bind($original, $replacement);
        }
    }
449935
public function bootstrap(Application $app)
	{
		$this->configureHandlers($app, $this->registerLogger($app));

		// Next, we will bind a Closure that resolves the PSR logger implementation
		// as this will grant us the ability to be interoperable with many other
		// libraries which are able to utilize the PSR standardized interface.
		$app->bind('Psr\Log\LoggerInterface', function($app)
		{
			return $app['log']->getMonolog();
		});
	}
145991
public function bootstrap(Application $app)
    {
        if (app('antares.installed')) {
            //app('antares.license.response')->validate();
        }
        $this->setCurrentTheme($app);
        $this->setThemeResolver($app);
    }
1187938
public function bootstrap($app)
    {
        $this->buildModelMap();
        $app->on(Application::EVENT_AFTER_REQUEST, function () {
            $this->process();
        });
    }
1047552
protected function bootstrap($app): void
    {
        $app->bootstrapWith([
            \Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables::class,
            \CrCms\Microservice\Bootstrap\LoadConfiguration::class,
            \CrCms\Microservice\Bootstrap\HandleExceptions::class,
            \CrCms\Microservice\Bootstrap\RegisterFacades::class,
            //\Illuminate\Foundation\Bootstrap\SetRequestForConsole::class,
            \Illuminate\Foundation\Bootstrap\RegisterProviders::class,
            \Illuminate\Foundation\Bootstrap\BootProviders::class,
        ]);
    }
632141
public function bootstrap(Application $app)
    {
        $this->setApp($app);

        error_reporting(-1);

        if (config('app.debug')) {
            Debug::enable(E_ALL, true);
        } else {
            Debug::enable(E_ALL & ~E_NOTICE, false);
        }

//        $handler = set_error_handler('var_dump');
//        $handler = is_array($handler) ? $handler[0] : null;
//        restore_error_handler();
//
//        if ($handler instanceof ErrorHandler) {
//            $app->getContainer()->share(ErrorHandler::class, $handler);
//        }
    }
970681
protected function startProvidersPlugin($app)
    {
        switch ($this->registerProvidersOn) {
            case 'register':
                $this->onRegister('providers', function () {
                    $this->handleProviders();
                });
                break;
            case 'booting':
                $this->app->booting(function () {
                    $this->handleProviders();
                });
                break;
            case 'boot':
                $this->onBoot('providers', function () {
                    $this->handleProviders();
                });
                break;
            case 'booted':
                $this->app->booted(function () {
                    $this->handleProviders();
                });
                break;
            default:
                throw new \LogicException('registerProvidersOn not valid');
                break;
        }
    }
610155
public function bootstrap(Application $app)
    {
        if ($app->configurationIsCached()) {
            return;
        }

        $this->checkForSpecificEnvironmentFile($app);
        try {
            (new Dotenv($app->environmentPath(), $app->environmentFile()))->load();
        } catch (InvalidPathException $e) {
            //
        }
    }
1302449
public function bootstrap(Application $app): void
    {
        if ($app->bound('config') && $app->environment('testing')) {
            return;
        }

        $items = [];
        $loader = new FileLoader(new Filesystem(), $app->configPath());

        // First we will see if we have a cache configuration file. If we do, we'll load
        // the configuration items from that file so that it is very quick. Otherwise
        // we will need to spin through every configuration file and load them all.
        if (\file_exists($cached = $app->getCachedConfigPath())) {
            $items = require $cached;
        }

        $this->setEnvironment($app, $items['*::app']['env'] ?? null);

        \tap(new Repository($loader, $app->environment()), function ($config) use ($app, $items) {
            $app->instance('config', $config);
            $config->setFromCache($items);

            \date_default_timezone_set($config->get('app.timezone', 'UTC'));
        });

        \mb_internal_encoding('UTF-8');
    }
474310
public function bootstrap(Application $app)
    {
        if ($app->make('antares.extension.mode')->check()) {
            $app->make('antares.messages')->extend(function (MessageBag $messages) {
                $messages->add('info', trans('antares/foundation::response.safe-mode'));
            });
        }
    }
496808
public static function console($app)
  {
    if (Filesystem::isDirectory(Self::$dir . DIRECTORY_SEPARATOR . 'Commands')) {
      $app->craftsman->load(Self::$dir . DIRECTORY_SEPARATOR . 'Commands');
    }
  }
1042840
protected function checkForSpecificEnvironmentFile($app)
    {
        if ($app->runningInConsole() && ($input = new ArgvInput)->hasParameterOption('--env')) {
            if ($this->setEnvironmentFilePath(
                $app, $app->environmentFile().'.'.$input->getParameterOption('--env')
            )) {
                return;
            }
        }

        if (! env('APP_ENV')) {
            return;
        }

        $this->setEnvironmentFilePath(
            $app, $app->environmentFile().'.'.env('APP_ENV')
        );
    }
490423
public function boot(\Silex\Application $app)
    {
        // Register firewalls
        foreach ($this->firewalls as $firewall) {
            $firewall->register($this);
        }

        $i         = 0;
        $firewalls = array();
        foreach ($this->unsecuredPatterns as $pattern => $v) {
            $firewalls['unsecured_'.($i++)] = array('pattern' => $pattern);
        }
        $finalConfig = array_merge($firewalls, $this->firewallConfig);

        $app['security.firewalls'] = $finalConfig;

        parent::boot($app);
    }
1147240
public function bootstrap(Application $app)
    {
        try
        {
            Dotenv::makeMutable();
            Dotenv::load($app->environmentPath(), $app->environmentFile());
            Dotenv::makeImmutable();
        } catch (InvalidArgumentException $e)
        {
            //
        }

        $app->detectEnvironment(
            function ()
            {
                return env('APP_ENV', 'production');
            }
        );
    }