Loads the application bootstrap file.
961811
protected function bootstrap(): void
	{
		(function($app, $container): void
		{
			include $this->applicationPath . '/bootstrap.php';
		})($this, $this->container);
	}
365178
private function boot() {
        /**
         * making this loop for all type of assets
         * that we include and user in out sub classes
         */
        $this->loop = [
            'include' => $this->include,
            'ignore'  => $this->ignore,
            'css'     => $this->css,
            'js'      => $this->js,
        ];
        
        //modifying the baseDir for use
        $temp_base_dir = $this->baseDir;
        if ( ! is_dir($temp_base_dir)) {
            $temp_base_dir = config('asset.bower_dir') . $temp_base_dir;
        }
        $temp_base_dir = rtrim($temp_base_dir, '/') . '/';
        
        /**
         * foreach contents we search glob patterns or arrays
         * and list of the file that should be included
         */
        foreach ($this->loop as $kind => $contents) {
            if ( ! empty($contents)) {
                if ( ! is_array($contents)) {
                    $contents = [$contents];
                }
                $contentTemp = [];
                foreach ($contents as $content) {
                    if (preg_match("/\*/", $content)) {
                        $temp = $this->glob($temp_base_dir . $content);
                        foreach ($temp as $k => $contentFile) {
                            $contentTemp[] = str_replace($temp_base_dir, '', $contentFile);
                        }
                    } else {
                        $contentTemp[] = $content;
                    }
                }
                $this->loop[$kind] = $contentTemp;
            }
        }
    }
651890
public function boot()
    {
        // Set config file
        $this->publishes([
            __DIR__.'/config/panel.php'      => config_path('panel.php'),
            __DIR__.'/config/panel/User.yml' => config_path('panel/User.yml'),
        ], 'config');

        // Set the stylesheets around
        $this->publishes([
            __DIR__.'/assets/css/panel.css'             => public_path('css/panel.css'),
            __DIR__.'/resources/assets/sass/panel.scss' => resource_path('assets/sass/panel.scss'),
        ], 'public');

        // Load routes
        if (!$this->app->routesAreCached()) {
            require __DIR__.'/http/routes.php';
        }

        // Load translation files
        $this->loadTranslationsFrom(__DIR__.'/resources/lang', 'panel');

        $this->publishes([
            __DIR__.'/resources/lang' => resource_path('lang/vendor/panel'),
        ], 'lang');

        // Load views
        $this->loadViewsFrom(__DIR__.'/views', 'panel');
    }
868053
protected function bootstrap()
    {
        if ($this->extensions === null) {
            $file = Zilf::getAlias('@vendor/Zilfsoft/extensions.php');
            $this->extensions = is_file($file) ? include $file : [];
        }
        foreach ($this->extensions as $extension) {
            if (!empty($extension['alias'])) {
                foreach ($extension['alias'] as $name => $path) {
                    Zilf::setAlias($name, $path);
                }
            }
            if (isset($extension['bootstrap'])) {
                $component = Zilf::createObject($extension['bootstrap']);
                if ($component instanceof BootstrapInterface) {
                    Zilf::debug('Bootstrap with ' . get_class($component) . '::bootstrap()', __METHOD__);
                    $component->bootstrap($this);
                } else {
                    Zilf::debug('Bootstrap with ' . get_class($component), __METHOD__);
                }
            }
        }

        foreach ($this->bootstrap as $mixed) {
            $component = null;
            if ($mixed instanceof \Closure) {
                Zilf::debug('Bootstrap with Closure', __METHOD__);
                if (!$component = call_user_func($mixed, $this)) {
                    continue;
                }
            } elseif (is_string($mixed)) {
                if ($this->has($mixed)) {
                    $component = $this->get($mixed);
                } elseif ($this->hasModule($mixed)) {
                    $component = $this->getModule($mixed);
                } elseif (strpos($mixed, '\\') === false) {
                    throw new InvalidConfigException("Unknown bootstrapping component ID: $mixed");
                }
            }

            if (!isset($component)) {
                $component = Zilf::createObject($mixed);
            }

            if ($component instanceof BootstrapInterface) {
                Zilf::debug('Bootstrap with ' . get_class($component) . '::bootstrap()', __METHOD__);
                $component->bootstrap($this);
            } else {
                Zilf::debug('Bootstrap with ' . get_class($component), __METHOD__);
            }
        }
    }
720723
public function bootstrap(Application $app)
    {
        $uri = $app->make('config')->get('app.url', 'http://localhost');

        $components = parse_url($uri);

        $server = $_SERVER;

        if (isset($components['path'])) {
            $server = array_merge($server, [
                'SCRIPT_FILENAME' => $components['path'],
                'SCRIPT_NAME' => $components['path']
            ]);
        }

        $app->instance('request', Request::create(
            $uri,
            'GET',
            [],
            [],
            [],
            $server
        ));
    }
230235
public function bootstrap(Application $app)
	{
		$url = $app['config']->get('app.url', 'http://localhost');

		$app->instance('request', Request::create($url, 'GET', [], [], [], $_SERVER));
	}
640161
public function boot()
    {
        // Bootstrap handles
        $this->routeHandle();
        $this->configHandle();
        $this->langHandle();
        $this->viewHandle();
        $this->assetHandle();
        $this->migrationHandle();
        $this->cssHandle();
        $this->jsHandle();
    }
935143
public function bootstrap()
    {
        $app = Zilf::$app;
        $this->checkForSpecificEnvironmentFile($app);

        try {
            (new Dotenv($app->environmentPath(), $app->environmentFile()))->load();
        } catch (InvalidPathException $e) {
            //
        } catch (InvalidFileException $e) {
            die('The environment file is invalid: ' . $e->getMessage());
        }
    }
775438
public static function boot(): void
    {
        parent::boot();
        static::bootStapler();

        // Modify file name before saving.
        static::saving(function (CategoryIcon $categoryIcon) {
            if ($categoryIcon->isDirty('icon_file_name') && !is_null($categoryIcon->icon_file_name)) {
                $pathInfo = pathinfo(
                    $categoryIcon->icon->originalFileName()
                );

                if ($pathInfo && isset($pathInfo['extension'])) {
                    $newFilename = md5(time()) . '.' . $pathInfo['extension'];
                    $categoryIcon->icon->instanceWrite('file_name', $newFilename);
                }
            }
        });
    }
739555
public function bootstrap()
    {
        if(!$this->isBootstrapped())
        {
            $manager = $this->getObject('manager');

            /*
             * Load resources
             *
             * If cache is enabled and the bootstrapper has been run we do not reload the config resources
             */
            if(!$this->getConfig()->bootstrapped)
            {
                $factory = $this->getObject('object.config.factory');

                foreach($this->_manifests as $manifest)
                {
                    if (isset($manifest['identifier']))
                    {
                        $identifier = $manifest['identifier'];

                        if (isset($this->_components[$identifier])) {
                            throw new \RuntimeException(sprintf('Cannot re-bootstrap component: %s', $identifier));
                        }

                        //Set the path
                        $this->_components[$identifier] = $manifest['paths'];

                        //Set the namespace
                        if (isset($manifest['namespace']))
                        {
                            $namespace = $manifest['namespace'];
                            $this->_namespaces[$identifier] = array($namespace => $manifest['paths']);
                        }
                    }
                }

                foreach($this->_manifests as  $manifest)
                {
                    if (isset($manifest['extends']))
                    {
                        $extends = $manifest['extends'];

                        if (!isset($this->_components[$extends])) {
                            throw new \RuntimeException(sprintf('Component: %s not found', $extends));
                        }

                        if(isset($manifest['identifier']))
                        {
                            $identifier = $manifest['identifier'];

                            //Append paths
                            $this->_components[$identifier] = array_merge(
                                $this->_components[$identifier],
                                $this->_components[$extends]
                            );

                            //Set the namespace
                            if (isset($manifest['namespace']))
                            {
                                $namespace = $manifest['namespace'];

                                //Append the namespace
                                $this->_namespaces[$identifier] = array_merge(
                                    $this->_namespaces[$identifier],
                                    $this->_namespaces[$extends]
                                );
                            }
                        }
                        else
                        {
                            //Prepend paths
                            $this->_components[$extends] = array_merge(
                                $manifest['paths'],
                                $this->_components[$extends]
                            );

                            //Set the namespace
                            if (isset($manifest['namespace']))
                            {
                                $namespace = $manifest['namespace'];

                                //Prepend the namespace
                                $this->_namespaces[$extends] = array_merge(
                                    array($namespace => $manifest['paths']),
                                    $this->_namespaces[$extends]
                                );
                            }
                        }
                    }
                }

                $identifiers = array();
                $aliases     = array();

                foreach($this->_files as $path)
                {
                    $array = $factory->fromFile($path, false);

                    //Priority
                    if(isset($array['priority'])) {
                        $priority = $array['priority'];
                    } else {
                        $priority = self::PRIORITY_NORMAL;
                    }

                    //Aliases
                    if(isset($array['aliases']))
                    {
                        if(!isset($aliases[$priority])) {
                            $aliases[$priority] = array();
                        }

                        $aliases[$priority] = array_merge($aliases[$priority], $array['aliases']);;
                    }

                    //Identifiers
                    if(isset($array['identifiers']))
                    {
                        if(!isset($identifiers[$priority])) {
                            $identifiers[$priority] = array();
                        }

                        foreach ($array['identifiers'] as $identifier => $config)
                        {
                            if (array_key_exists($identifier, $identifiers[$priority]))
                            {
                                $existing = new ObjectConfig($identifiers[$priority][$identifier]);
                                $existing->append($config);

                                $identifiers[$priority][$identifier] = $existing->toArray();
                            }
                            else $identifiers[$priority][$identifier] = $config;
                        }
                    }
                }

                /*
                 * Set the identifiers
                 *
                 * Collect identifiers by priority and then flatten the array.
                 */
                $identifiers_flat = array();

                ksort($identifiers);
                foreach ($identifiers as $priority => $merges) {
                    $identifiers_flat = array_merge_recursive($identifiers_flat, $merges);
                }

                foreach ($identifiers_flat as $identifier => $config) {
                    $manager->setIdentifier(new ObjectIdentifier($identifier, $config));
                }

                /*
                 * Set the aliases
                 *
                 * Collect aliases by priority and then flatten the array.
                 */
                $aliases_flat = array();

                foreach ($aliases as $priority => $merges) {
                    $aliases_flat = array_merge($merges, $aliases_flat);
                }

                foreach($aliases_flat as $alias => $identifier) {
                    $manager->registerAlias($identifier, $alias);
                }

                /*
                 * Reset the bootstrapper in the object manager
                 *
                 * If cache is enabled this will prevent the bootstrapper from reloading the config resources
                 */
                $identifier = new ObjectIdentifier('lib:object.bootstrapper', array(
                    'bootstrapped' => true,
                    'directories'  => $this->_directories,
                    'components'   => $this->_components,
                    'namespaces'   => $this->_namespaces,
                    'files'        => $this->_files,
                    'aliases'      => $aliases_flat,
                ));

                $manager->setIdentifier($identifier)
                    ->setObject('lib:object.bootstrapper', $this);
            }
            else
            {
                foreach($this->_aliases as $alias => $identifier) {
                    $manager->registerAlias($identifier, $alias);
                }
            }

            /*
             * Setup the component class locator
             *
             * Locators are always setup as the  cannot be cached in the registry objects.
             */
            foreach($this->_namespaces as $identifier => $namespaces)
            {
                //Register the namespace in the component class locator
                foreach($namespaces as $namespace => $paths) {
                    $manager->getClassLoader()->getLocator('component')->registerNamespace($namespace, $paths);
                }

                //Register the namespace in the component objects locator
                $manager->getLocator('component')->registerIdentifier($identifier, array_keys($namespaces));
            }

            $this->_bootstrapped = true;
        }
    }
434506
public function boot()
    {
        $app = $this->app;

        if (!$app->runningInConsole()) {
            return;
        }

        $source = realpath(__DIR__ . '/config/config.php');

        if (class_exists('Illuminate\Foundation\Application', false)) {
            // L5
            $this->publishes([$source => config_path('sniffer-rules.php')]);
            $this->mergeConfigFrom($source, 'sniffer-rules');
        } elseif (class_exists('Laravel\Lumen\Application', false)) {
            // Lumen
            $app->configure('sniffer-rules');
            $this->mergeConfigFrom($source, 'sniffer-rules');
        } else {
            // L4
            $this->package('socialengine/sniffer-rules', null, __DIR__);
        }
    }
143599
public function boot()
    {
        $this->loadMigrationsFrom($this->getDirectory().'/../../database/migrations');
        $this->loadRoutes();
        $this->loadTranslations();
        $this->loadAssets();
    }
1156044
public function bootstrap()
    {

        // Start the rudimental system
        try {

            // Load settingsfile
            $this->loadSettings();

            // From here starts output buffering
            ob_start();

            // Registe PSR classloader
            $this->registerClassloader();

            // Create core DI container instance and map the instance to comntainer
            $this->di = \Core\DI\DI::getInstance();
            $this->di->mapValue('core.di', $this->di);

            $this->initLogger();

            // Run inits
            $this->initDatabase();
            $this->initMessageHandler();
            $this->initDependencies();
            $this->initHttp();
            $this->initSession();
            $this->initConfig();
            $this->initMailer();
            $this->initRouter();

            // Get an instance of Core app
            $this->getAppInstance('Core');

            $this->initSecurity();
            $this->initPage();
            $this->initAssetManager();

            // Run highlevel system
            $this->autodiscoverApps();

            // Match request against the generic routes to get the ajax request flag and to match a fallback result.
            $this->router->match();

            // Initiate apps
            $this->initApps();

            // Match routes again as now possible app routes are available
            $this->router->match();

            // Run dispatcher
            $result = $this->dispatch();

            // Send mails
            $this->mailer->send();

            // Process all assets
            $this->processAssets();

            // Send cookies
            $this->http->cookies->send();

            // Redirect requested?
            if (!empty($_SESSION['Core']['redirect'])) {

                $this->http->header->location($_SESSION['Core']['redirect']['location'], $_SESSION['Core']['redirect']['permanent']);
                $this->http->header->send();

                // Important: Clear redirect from session!
                unset($_SESSION['Core']['redirect']);

                return;
            }

            switch ($this->router->getFormat()) {

                case 'file':
                    $sendfile = new Sendfile($result);
                    $sendfile->send();

                    break;

                case 'html':

                    $this->http->header->contentType('text/html', 'utf-8');

                    $language = $this->getAppInstance('Core')->language;

                    // Add logoff button for logged in users
                    if ($this->user->isGuest()) {
                        $this->page->menu->createItem('register', $language->get('menu.register'), $this->router->generate('core.register'));
                        $this->page->menu->createItem('login', $language->get('menu.login'), $this->router->generate('core.login', [
                            'action' => 'login'
                        ]));
                    }

                    // or add login and register buttons. But not when current user is currently on banlist
                    else {

                        $usermenu = $this->page->menu->createItem('login', $this->user->getDisplayname());

                        // Show admin menu?
                        if ($this->user->getAdmin()) {
                            $usermenu->createItem('admin', $language->get('menu.admin'), $this->router->generate('core.admin'));
                        }

                        $usermenu->createItem('logout', $language->get('menu.logout'), $this->router->generate('core.login', [
                            'action' => 'logout'
                        ]));
                    }

                    $this->page->setHome($this->config->get('Core', 'url.home'));
                    $this->page->setContent($result);

                    $result = $this->page->render();
            }

            // Send headers so far
            $this->http->header->send();
        }
        catch (\Throwable $t) {

            $error = new ErrorHandler($t);
            $error->setAjax(isset($_REQUEST['ajax']));
            $error->setPublic(isset($this->user) && $this->user->getAdmin());
            $error->setPublic(true);

            if (isset($this->logger)) {
                $error->setLogger($this->logger);
            }

            http_response_code(500);

            $result = $error->handle();
        }

        echo $result;

        ob_end_flush();
    }
183895
protected function bootstrap()
    {
        $this->make('Sun\Bootstrap\Application')->bootstrap();

        $this->make('Sun\Bootstrap\HandleExceptions')->bootstrap();

        $this->make('Sun\Bootstrap\Route')->bootstrap();

        $this->make('Sun\Bootstrap\Provider')->bootstrap();

        $this->route = $this->make('Sun\Contracts\Routing\Route');
    }
1161912
public function boot()
    {
        $this->loadViewsFrom(__DIR__.'/../resources/views', 'bootstrap');

        if ($this->app->runningInConsole()) {
            $this->publishes([
                __DIR__.'/../resources/views' => resource_path('views/vendor/bootstrap'),
            ], 'views');
        }
    }
647267
public function boot()
    {
        $this->addEventAnnotations($this->app->make('annotations.event.scanner'));

        $this->loadAnnotatedEvents();

        $this->addRoutingAnnotations($this->app->make('annotations.route.scanner'));

        if (!$this->app->routesAreCached()) {
            $this->loadAnnotatedRoutes();
        }

        $this->addModelAnnotations($this->app->make('annotations.model.scanner'));

        $this->loadAnnotatedModels();
    }
687756
public function boot()
    {

        $this->loadViewsFrom(__DIR__.'/../../views', 'expendable');
        $this->loadTranslationsFrom(__DIR__.'/../../lang', 'expendable');
        $this->loadMigrationsFrom(__DIR__.'/../../database/migrations/');


        $this->publishes([
            __DIR__.'/../../config/config.php'    => config_path('expendable.php'),
            __DIR__.'/../../database/seeds/'      => base_path('/database/seeds'),
        ]);


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

        $autoLoaderListener = new \Distilleries\Expendable\Register\ListenerAutoLoader(config('expendable.listener'));
        $autoLoaderListener->load();

    }