Partially bootstrap Civi services (such as localization).
168137
protected function boot($method, $fields) {
    $model = $this->setup->getModel();

    define('CIVICRM_UF', $model->cms);

    // Set the Locale (required by CRM_Core_Config)
    global $tsLocale;
    $tsLocale = 'en_US';

    // CRM-16801 This validates that lang is valid by looking in $langs.
    // NB: the variable is initial a $_REQUEST for the initial page reload,
    // then becomes a $_POST when the installation form is submitted.
    $langs = $model->getField('lang', 'options');
    if (array_key_exists('lang', $fields)) {
      $model->lang = $fields['lang'];
    }
    if ($model->lang and isset($langs[$model->lang])) {
      $tsLocale = $model->lang;
    }

    \CRM_Core_Config::singleton(FALSE);
    $GLOBALS['civicrm_default_error_scope'] = NULL;

    // The translation files are in the parent directory (l10n)
    \CRM_Core_I18n::singleton();

    $this->setup->getDispatcher()->dispatch('civi.setupui.boot', new UIBootEvent($this, $method, $fields));
  }
1211114
def bootstrap(options):
    """"""
    try:
        import virtualenv
    except ImportError, e:
        raise RuntimeError("virtualenv is needed for bootstrap")

    bdir = options.bootstrap_dir
    if not os.path.exists(bdir):
        os.makedirs(bdir)
    bscript = "boostrap.py"

    options.virtualenv.script_name = os.path.join(options.bootstrap_dir,
                                                  bscript)
    options.virtualenv.no_site_packages = True
    options.bootstrap.no_site_packages = True
    print options.virtualenv.script_name
    call_task('paver.virtual.bootstrap')
    sh('cd %s; %s %s' % (bdir, sys.executable, bscript))
404829
public function boot()
    {
        if (config('modules.register.translations', true) === true) {
            $this->registerTranslation();
        }

        if ($this->isLoadFilesOnBoot()) {
            $this->registerFiles();
        }

        $this->fireEvent('boot');
    }
981102
public function bootstrap()
    {
        # set application timezone
        date_default_timezone_set($this->app->config->getApp('timezone'));

        # set application error log path
        ini_set("error_log", $this->app->logFilePath());

        # set application session name
        ini_set('session.name', 'planet_session');

        # set application session storage path
        session_save_path(realpath($this->app->sessionDirectoryPath()));
    }
1250629
protected function bootstrap()
    {
        parent::bootstrap();

        $this->viewPath = __DIR__ . '/views';

        if (!isset($this->i18n->translations['colibri'])) {
            $this->i18n->translations['colibri'] = [
                'class' => 'yii\i18n\PhpMessageSource',
                'basePath' => __DIR__ . '/messages'
            ];
        }

        // Look in @app/messages directory for all categories
        if (!isset($this->i18n->translations['*'])) {
            $this->i18n->translations['*'] = [
                'class' => 'yii\i18n\PhpMessageSource',
                'basePath' => '@app/messages'
            ];
        }

        if (!file_exists($this->basePath . '/.env')) {
            // Remove query part
            $url = preg_replace('/\?.*$/', '', $this->getRequest()->url);

            if ($url != '/install') {
                $this->getResponse()->redirect(['/install']);
            }

            /* Now the route is install.
             *
             * Set the minimal layout to avoid potential db queries in the main layout
             */
            $this->layout = 'minimal';
        }
    }
961811
protected function bootstrap(): void
	{
		(function($app, $container): void
		{
			include $this->applicationPath . '/bootstrap.php';
		})($this, $this->container);
	}
1207682
protected function bootConfiguration()
    {
        $path = $this->extensionPath . '/../';
        $this->addConfigComponent($this->routeGroup, $this->routeGroup, "{$path}/resources/config");
        $this->addLanguageComponent($this->routeGroup, $this->routeGroup, "{$path}/resources/lang");
        $this->addViewComponent($this->routeGroup, $this->routeGroup, "{$path}/resources/views");
    }
96153
public function bootstrap()
    {
        $config = Zilf::$container->getShare('config');

        $this->loadConfigurationFiles($config);

        Zilf::$app->environment = $config->get('app.app_env');

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

        mb_internal_encoding('UTF-8');
    }
846148
public function boot()
    {
        View::share('users', User::all());
        View::share('comments', Comment::all());
        View::share('comment', Comment::first());
    }
1206860
public function boot()
    {
        if ($this->app->runningInConsole()) {

            $this->loadTranslationsFrom(__DIR__.'/../translations', 'self-diagnosis');

            $this->publishes([
                __DIR__.'/../translations' => resource_path('lang/vendor/self-diagnosis'),
            ], 'translations');

            $this->publishes([
                __DIR__.'/../config/config.php' => config_path('self-diagnosis.php'),
            ], 'config');
        }
    }
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());
        }
    }
195998
function bootstrap(monitor) {
    plugins.logger.attach.call(monitor, options);
    if (options.watch) {
      plugins.watch.attach.call(monitor, options);
    }
  }
638459
public function bootstrap()
    {
        $providers = Zilf::$container->getShare('config')->get('services');

        foreach ($providers as $provider) {
            $instance = $this->createProvider($provider);
            $instance->register();
        }
    }
1113766
public function bootStrap()
    {
        $this->initEnvironment();
        $this->initConfig();

        if ('testing'==env('APP_ENV')) {
            error_reporting(-1);
            ini_set('display_errors', 'On');
        } else {
            error_reporting(E_ALL);
            ini_set('display_errors', 'Off');
        }

        set_error_handler([$this, 'handleError']);

        register_shutdown_function([$this, 'handleShutdown']);
    }
661605
def bootstrap():
    """"""
    # a bit hacky - forge an initial checkpoint with the name that subsequent
    # Estimator runs will expect to find.
    #
    # Estimator will do this automatically when you call train(), but calling
    # train() requires data, and I didn't feel like creating training data in
    # order to run the full train pipeline for 1 step.
    maybe_set_seed()
    initial_checkpoint_name = 'model.ckpt-1'
    save_file = os.path.join(FLAGS.work_dir, initial_checkpoint_name)
    sess = tf.Session(graph=tf.Graph())
    with sess.graph.as_default():
        features, labels = get_inference_input()
        model_fn(features, labels, tf.estimator.ModeKeys.PREDICT,
                 params=FLAGS.flag_values_dict())
        sess.run(tf.global_variables_initializer())
        tf.train.Saver().save(sess, save_file)
627938
public function bootstrap(): void
    {
        foreach ($this->bootstrap as $mixed) {
            $component = null;
            if ($mixed instanceof \Closure) {
                $this->debug('Bootstrap with Closure', __METHOD__);
                if (empty($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 = $this->createObject($mixed);
            }

            if ($component instanceof BootstrapInterface) {
                $this->debug('Bootstrap with ' . get_class($component) . '::bootstrap()', __METHOD__);
                $component->bootstrap($this);
            } else {
                $this->debug('Bootstrap with ' . get_class($component), __METHOD__);
            }
        }
    }
69938
public function bootstrapTasks()
    {
        $tasks = [
            Check::class,
            Cleanup::class,
            CreateRelease::class,
            CurrentRelease::class,
            Dependencies::class,
            Deploy::class,
            FridayDeploy::class,
            Ignite::class,
            Installer::class,
            Migrate::class,
            Notify::class,
            Primer::class,
            Rollback::class,
            Setup::class,
            SwapSymlink::class,
            Teardown::class,
            Test::class,
            Update::class,
            Updater::class,
        ];

        foreach ($tasks as $task) {
            $task = new $task();
            $task->setContainer($this->container);
            $this->builder->buildTask($task);
        }
    }