We will trigger after booting application event if it is
activated in Event Middleware.

@return bool
501194
public function beforeBootingApplication()
    {
        if (!$this->activateEventMiddleWare()) {
            return false;
        }

        if ($this->container->get('event')->isAppEventEnabled() == false) {
            return true;
        }

        $this->attachEvents();

        return $this->container->get('event')->trigger('beforeBootingApplication', $this->container);
    }
329892
public static function initEvent()
    {
        if (!self::$supported) {
            return;
        }
        self::updateConfig();
        self::$fd = eio_get_event_stream();
        self::$ev = EventLoop::$instance->event(self::$fd,
            \Event::READ | \Event::PERSIST,
            function ($fd, $events, $arg) {
                while (eio_nreqs()) {
                    eio_poll();
                }
            }
        );
        self::$ev->add();
    }
980946
public function init()
    {
        if (true === $this->initialized) {
            return;
        }

        $this->registerPhpcrCommands();
        $this->registerPhpcrStandaloneCommands();
        $this->registerShellCommands();

        $event = new ApplicationInitEvent($this);
        $this->dispatcher->dispatch(PhpcrShellEvents::APPLICATION_INIT, $event);
        $this->initialized = true;
    }
33574
public function onAfterInit()
    {
        // Suppress errors if dev/build necessary
        if (!Security::database_is_ready()) {
            return false;
        }
        $currentMember = Security::getCurrentUser();
        if (!$currentMember || !$currentMember->exists()) {
            return false;
        }

        $statusCode = $this->owner->getResponse()->getStatusCode();

        if (substr($statusCode, 0, 1) == '4') {
            $this->logPermissionDenied($statusCode, $currentMember);
        }
    }
1073675
protected function bootMemoryEvent()
    {
        $app = $this->app;
        /** looking for forms * */
        //$app->make('events')->listen('antares.forms', function ($name) use ($app) {
        $app->make('events')->listen(Form::class, function (Form $event) use ($app) {
            $app->make('antares.memory')->make('registry.forms')->put('forms', $event->formName);
        });
        /** when application is terminating we collect all data from application * */
        $app->terminating(function () use ($app) {
            if (!app('antares.installed')) {
                //$app->make('antares.memory')->finish();
            }
        });
        //$app->make('events')->listen('antares.after.load-service-providers', function() {
        $app->make('events')->listen(LoadServiceProviders::class, function() {
            $this->app->make('antares.defered.service')->run();
        });
    }
77495
public function boot()
    {
        $app = $this->app;

        (new Registrar)->boot($app, $this->environment->addons());

        $app['events']->fire(new Events\AddonBooted($this->environment));
    }
1238157
public function boot()
    {
        $systemLocales = config('multilingual.locales');

        $this->publishes([
            __DIR__.'/config/multilingual.php' => config_path('multilingual.php'),
        ]);


        $this->app['validator']->extendImplicit('translatable_required', function ($attribute, $value, $parameters) use ($systemLocales) {
            if (! is_array($value)) {
                return false;
            }

            // Get only the locales that has a value and exists in the system locales array
            $locales = array_filter(array_keys($value), function ($locale) use ($value, $systemLocales) {
                return @$value[$locale] && in_array($locale, $systemLocales);
            });

            foreach ($systemLocales as $systemLocale) {
                if (! in_array($systemLocale, $locales)) {
                    return false;
                }
            }

            return true;
        });
    }
845073
public function boot()
	{
		require $this->flyphp['path'].'/start/flyconsole.php';

		// If the event dispatcher is set on the application, we will fire an event
		// with the FlyConsole instance to provide each listener the opportunity to
		// register their commands on this application before it gets started.
		if (isset($this->flyphp['events']))
		{
			$this->flyphp['events']
					->fire('flyconsole.start', array($this));
		}

		return $this;
	}
1248716
protected function afterCreate()
    {
        $this->dispatcher->getEventsManager()->fire(Events::AFTER_CREATE, $this);
        return $this->afterSave();
    }
506446
public function boot()
	{
		$path = $this->laravel['path'].'/config/wel.php';

		if (file_exists($path))
		{
			require $path;
		}

		// If the event dispatcher is set on the application, we will fire an event
		// with the Artisan instance to provide each listener the opportunity to
		// register their commands on this application before it gets started.
		if (isset($this->laravel['events']))
		{
			$this->laravel['events']
				->fire('artisan.start', array($this));
		}

		return $this;
	}
32573
public static function boot()
    {
        parent::boot();

        static::created(function(ApiKey $apiKey) {
            self::logApiKeyAdminEvent($apiKey, self::EVENT_NAME_CREATED);
        });

        static::updated(function($apiKey) {

            $changed = $apiKey->getDirty();

            if (isset($changed) && $changed['active'] === 1) {
                self::logApiKeyAdminEvent($apiKey, self::EVENT_NAME_ACTIVATED);
            }

            if (isset($changed) && $changed['active'] === 0) {
                self::logApiKeyAdminEvent($apiKey, self::EVENT_NAME_DEACTIVATED);
            }

        });

        static::deleted(function($apiKey) {
            self::logApiKeyAdminEvent($apiKey, self::EVENT_NAME_DELETED);
        });
    }
618276
protected function bootNewApplication()
    {
        $memory = $this->app->make('antares.memory')->make('runtime.antares');
        $memory->put('site.name', 'Antares');

        $this->menu()->add('install')
                ->link($this->handles('antares::install'));

        $this->app['antares.installed'] = false;
        return $memory;
    }
242381
public static function boot() {
        parent::boot();

        $myself   = get_called_class();
        $hooks    = array('before' => 'ing', 'after' => 'ed');
        $radicals = array('sav', 'validat', 'creat', 'updat', 'delet');

        foreach ($radicals as $rad) {
            foreach ($hooks as $hook => $event) {
                $method = $hook.ucfirst($rad).'e';
                if (method_exists($myself, $method)) {
                    $eventMethod = $rad.$event;
                    self::$eventMethod(function($model) use ($method){
                        return $model->$method($model);
                    });
                }
            }
        }
    }
20568
protected function checkStarted(): bool
    {
        if (!$this->started) {
            $this->started = self::sessionStart();
        }
        if (isset($_SESSION[$this->namespace]) && !is_array($_SESSION[$this->namespace])) {
            $_SESSION[$this->namespace] = [];
        }
        return (bool) $this->started;
    }
511531
protected function _boot() {

			// Start the session
			session_start();

			// Create local inflector
			static::$inflector = Inflector::instance();

			// Create configuration
			$this->_configure();

			// Configure session :)
			session_set_cookie_params($this->config->sessionCookieExpireTime);
			if ($this->config->sessionRegenerateId) {
				session_regenerate_id();
			}
			
			// Apply Application's namespace
			AutoLoad::autoLoadNamespace($this->config->applicationNamespace, APP_PATH);

			// Auto load modules?
			if ($this->config->autoLoadModules == true) {
				$this->_loadModules();
			}

			// Create request
			$this->_request = new Request();
			
			// Check if static file exists?
			if ($this->config->staticThroughChickenWire && $this->_request->rawUri != '') {
			
				// In application?
				$filename = PUBLIC_PATH . $this->_request->rawUri;
				if (file_exists($filename)) {
					
					// Mime available?
					$mime = Mime::byFile($filename);
					
					// Send header
					Http::sendMimeType($mime);
					echo file_get_contents($filename);
					die;

				}

				// In modules
				foreach (Module::all() as $module) {

					// In this module?
					$regex = '/^' . preg_quote($module->urlPrefix, '/') . '\/(?<url>.+)$/';
					if (preg_match($regex, $this->_request->rawUri, $matches)) {

						// Does the file exist?
						$filename = $module->path . "/Public/" . $matches['url'];
						if (file_exists($filename)) {
							
							// Mime available?
							$mime = Mime::byFile($filename);
							
							// Send header
							Http::sendMimeType($mime);
							echo file_get_contents($filename);
							die;

						}

					} 

				}

			}

			// Try to route!
			$this->_matchRoute();

		}
276046
public function boot()
    {
        foreach ($this->processes as $process) {
            $processResolved = $this->resolver->resolve($process);
            $processResolved->boot();
        }
        return true;
    }
124635
protected function triggerOnStartup(): AbstractApplication
    {
        foreach ($this->getModules() as $module) {
            if ($module instanceof StartupProviderInterface) {
                $module->onStartup(
                    $this->getServiceLocator()
                );
            }
        }

        return $this;
    }