Ensures that the appropriate plugins are booted and then executes the application.

@return void
@throws InvalidEngineStateException
431954
public function run(Application $application) : void {
        if ($this->engineState !== 'idle') {
            throw new InvalidEngineStateException('Engine::run() MUST NOT be called while already running.');
        }

        Loop::setErrorHandler(function(\Throwable $error) use($application) {
            $application->exceptionHandler($error);
            Loop::defer(function() use($application) {
                yield $this->emitAppCleanupEvent($application);
            });
        });

        Loop::run(function() use($application) {
            $this->engineState = 'running';

            if (!$this->hasPlugin(get_class($application))) {
                $this->registerPlugin($application);
            }

            if (!$this->engineBooted) {
                yield $this->emitEngineBootupEvent();
                $this->engineBooted = true;
            }

            yield $application->execute();
            yield $this->emitAppCleanupEvent($application);
            $this->engineState = 'idle';
        });
    }
168501
public function boot()
    {
        if ($this->booted) {
            return;
        }

        if (!$this->name) {
            throw new \LogicException('Package: ' . get_class($this) . ' name property should not be empty.');
        }

        $this->getConfig();

        $this->registerProviders($this->getContainer());

        $this->registerListeners($this->getDispatcher());

        $this->registerMiddlewares();

        $this->booted = true;
    }
727343
public function boot()
    {
        $this->registerMorphs();
        $this->setTablePrefix();
        $this->setUserModel();

        $this->registerAtGate();

        if ($this->runningInConsole()) {
            $this->publishMiddleware();
            $this->publishMigrations();
        }
    }
1294391
public function boot()
    {
        if ($this->booted) {
            return;
        }

        $this->fireAppCallback($this->bootingCallbacks);

        /** @var ExtensionManager $manager */
        $manager = $this->make(Manager::class);

        $manager->boot();

        foreach ($this->providers as $provider) {
            if (method_exists($provider, 'boot')) {
                $this->call([$provider, 'boot']);
            }
        }

        $this->fireAppCallback($this->bootedCallbacks);
    }
970437
public function boot()
    {
        $this->app->resolving(RequestAbstract::class, function ($request, $app) {
            $this->initializeRequest($request, $app['request']);
        });
        
        $this->app->afterResolving(RequestAbstract::class, function ($resolved) {
            $resolved->validateResolved();
        });

    }
605765
protected function initialize()
    {
        // Sanity check; must be on (or after) `plugins_loaded` hook.
        // If uninstalling, must be on (or after) `init` hook.

        if (!did_action('plugins_loaded')) {
            throw new Exception('`plugins_loaded` action not done yet.');
        } elseif ($this->Config->§uninstall && !did_action('init')) {
            throw new Exception('`init` action not done yet.');
        }
        // Check for any known conflicts.

        if ($this->s::conflictsExist()) {
            return; // Stop here.
        }
        // Check for any unsatisfied dependencies.

        if ($this->s::dependenciesUnsatisfied()) {
            return; // Stop here.
        }
        // Add app instance to collection.

        if ($this->Parent && $this->Parent->is_core && !$this->Config->§uninstall) {
            $this->Parent->s::addApp($this);
        }
        // Remaining routines are driven by setup hook.

        if ($this->Config->§uninstall || did_action($this->Config->§setup['§hook'])) {
            $this->onSetup(); // Run setup immediately.
        } else { // Delay setup routines; i.e., attach to hook.
            add_action($this->Config->§setup['§hook'], [$this, 'onSetup'], $this->Config->§setup['§hook_priority']);
        }
    }
644181
public function boot()
    {
        if ($this->booted) {
            return;
        }

        $this->booted = true;

        foreach ($this->providers as $provider) {
            if ($provider instanceof EventListenerProviderInterface) {
                $provider->subscribe($this, $this['dispatcher']);
            }

            if ($provider instanceof BootableProviderInterface) {
                $provider->boot($this);
            }
        }
    }
497835
protected static function boot()
    {
        parent::boot();

        static::deleting(function ($model) {
            $model->roles()->detach();

            $model->permissions()->detach();
        });
    }
527307
public static function boot()
    {
        parent::boot();

        self::creating(function ($user) {
            if (!$user->api_key) {
                $user->api_key = self::generateApiKey();
            }
        });
    }
41029
public function initialize()
    {
        $this->engine = $this->initEngine();

        // bootstap callback.
        foreach ($this->application->config('renderer.initializers.*') as $initializer) {
            $initializer($this->application, $this);
        }
    }
1060660
public function boot()
    {
        $source = realpath($raw = __DIR__.'/config/tinker.php') ?: $raw;

        if ($this->app instanceof Application && $this->app->runningInConsole()) {
            $this->publishes([$source => config_path('tinker.php')]);
        }

        $this->mergeConfigFrom($source, 'tinker');
    }
753407
public function boot()
    {
        if ($this->app->runningInConsole()) {
            $this->commands([
                ManageIndexes::class,
            ]);
        }

        $this->app->make(EngineManager::class)->extend('mysql', function () {
            return new MySQLEngine(app(ModeContainer::class));
        });
    }
1054891
public function boot()
    {
        $this->app['events']->listen('router.matched', function(){

            $this->app->resolving(function(FormRequest $request, $app){

                $request->setRequest($app['request']);

            });

        });
    }
1185358
protected static function boot(): void
    {
        parent::boot();

        /**
         * Attach to the 'creating' Model Event to provide record with user id which is now creating this record
         */
        static::creating(function($model) {

            if (auth()->user()) {
                $creatorId = auth()->id();
            } else {
                $creatorId = null;
            }

            $model->{'created_by'} = $creatorId;
        });
    }
1030352
public function boot()
    {
        if ($this->app instanceof Laravel && $this->app->runningInConsole()) {
            $this->bootLaravelApplication();

        } elseif ($this->app instanceof Lumen) {
            $this->bootLumenApplication();
        }

        $this->mergeConfigFrom(__DIR__ . '/../resources/config/responder.php', 'responder');

        $this->commands([
            MakeTransformer::class
        ]);

        include __DIR__ . '/helpers.php';
    }
614888
public function activatePlugins(): void
    {
        foreach (array_keys($this->getPlugins()) as $plugin) {
            if (!$this->isPluginActive($plugin)) {
                $this->activatePlugin($plugin);
            }
        }
    }
1094126
public function boot()
	{
		if ($this->booted)
		{
			return;
		}

		array_walk($this->serviceProviders, function($p)
		{
			$this->bootProvider($p);
		});

		$this->booted = true;
	}