Boot the plugin.

@param  string $base_path
@param  array  $options

@throws Exception if plugin is loaded
3756
public static function boot( $base_path, array $options = [] ) {
        $name = plugin_basename( $base_path );

        if ( isset( static::$instances[$name] ) ) {
            throw new Exception( sprintf( 'Cannot boot `%s` again', $name ) );
        }

        $instance = new static( $base_path, $options );

        // @codeCoverageIgnoreStart
        add_action( $instance->get_action(), function () use ( $instance, $name ) {
            return static::$instances[$name] = $instance->load_files()->get_instance();
        } );
        // @codeCoverageIgnoreEnd
    }
146601
public function boot()
    {
        $this->loadDatabaseConnection();
        $this->loadLibraries();

        if (file_exists(system_path("registered-libraries-cli.php")))
        {
            require system_path("registered-libraries-cli.php");
        }

        if (file_exists(system_path("registered-global-middlewares-cli.php")))
        {
            require system_path("registered-global-middlewares-cli.php");
        }

        $application_commands = $this->getApplicationCommands(glob(app_path('Commands/*.php')));
        $skeleton_commands = $this->getSkeletonCoreCommands(glob(__DIR__ . "/Console/Commands/*.php"));
        $modules_commands = $this->getModulesCommands();

        $this->cli_app = new Application(config('app.name'));
        $this->cli_app->addCommands(array_merge($application_commands, $skeleton_commands, $modules_commands));
    }
1351904
public function bootstrap(?string $basePath = null): self
    {
        $this->createApplication($basePath);
        $this->baseKernelBinding();

        return $this;
    }
854918
protected function boot(): void
    {
        // boot extensions
        foreach ($this->extensionManager->getExtensions() as $extension) {
            if ($extension->isActivated()) {
                $extension->boot();
            }
        }

        // boot app
        $this->dispatch(new RoutesWillBeLoaded($this->router));
        $this->dispatch(new RoutesHaveBeenLoaded($this->router));

        // send back responses
        try {
            $response = $this->router->getResponse();
            $response->send();
        } catch (RouteNotFoundException $exception) {
            throw new HttpNotFoundException();
        } catch (ResourceNotFoundException $exception) {
            throw new HttpNotFoundException();
        } catch (MethodNotAllowedException $exception) {
            throw new HttpMethodNotAllowedException();
        }
    }
317085
protected function bootUsingLaravel(string $path): void
    {
        $this->mergeConfigFrom("{$path}/config/form.php", 'orchestra.form');
        $this->mergeConfigFrom("{$path}/config/table.php", 'orchestra.table');

        $this->publishes([
            "{$path}/config/form.php" => \config_path('orchestra/form.php'),
            "{$path}/config/table.php" => \config_path('orchestra/table.php'),
        ]);
    }
1259840
public function loadPaths($basePath = null, $configPath = null)
    {
        if ($basePath) {
            $this->basePath = realpath($basePath);
        }

        $this->paths = $this->loadConfig($configPath);

        return $this;
    }
99885
public function boot()
    {
        $path = \realpath(__DIR__.'/../');

        $this->addConfigComponent('orchestra/memory', 'orchestra/memory', "{$path}/config");

        if (! $this->hasPackageRepository()) {
            $this->bootUnderLaravel($path);
        }

        $this->loadMigrationsFrom([
            "{$path}/database/migrations",
        ]);

        $this->bootMemoryEvent();
    }
523931
public function boot()
    {
        if (is_dir(app_path().'/Modules/')) {
            $modules = config("modules.enable") ?: array_map('class_basename', $this->files->directories(app_path().'/Modules/'));
            foreach ($modules as $module) {
                // Allow routes to be cached
                if (!$this->app->routesAreCached()) {
                    $route_files = [
                        app_path() . '/Modules/' . $module . '/routes.php',
                        app_path() . '/Modules/' . $module . '/routes/web.php',
                        app_path() . '/Modules/' . $module . '/routes/api.php',
                    ];
                    foreach ($route_files as $route_file) {
                        if ($this->files->exists($route_file)) {
                            include $route_file;
                        }
                    }
                }
                $helper = app_path().'/Modules/'.$module.'/helper.php';
                $views  = app_path().'/Modules/'.$module.'/Views';
                $trans  = app_path().'/Modules/'.$module.'/Translations';

                if ($this->files->exists($helper)) {
                    include_once $helper;
                }
                if ($this->files->isDirectory($views)) {
                    $this->loadViewsFrom($views, $module);
                }
                if ($this->files->isDirectory($trans)) {
                    $this->loadTranslationsFrom($trans, $module);
                }
            }
        }
    }
1163707
public function setBasePath($path, $publicPath = true)
    {
        $this->basePath   = $path;
        $this->publicPath = $publicPath;
    }
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');
    }
1118453
public function boot()
	{
		$ds = DIRECTORY_SEPARATOR;
		$basedir = dirname( dirname( __DIR__ ) ) . $ds;

		$this->loadRoutesFrom( $basedir . 'routes.php' );
		$this->loadViewsFrom( $basedir . 'views', 'shop' );

		$this->publishes( [ $basedir . 'config/shop.php' => config_path( 'shop.php' ) ], 'config' );
		$this->publishes( [ dirname( $basedir ) . $ds . 'public' => public_path( 'packages/aimeos/shop' ) ], 'public' );
	}
627920
public function boot() {
		$loader = $this->fetch( 'loader' );

		if ( ! ( $loader instanceof LoaderContract ) ) {
			throw new UnexpectedValueException;
		}

		foreach ( $this as $alias => $value ) {
			if ( $value instanceof HasActions ) {
				$loader->register_actions( $value );
			}

			if ( $value instanceof HasFilters ) {
				$loader->register_filters( $value );
			}

			if ( $value instanceof HasShortcode ) {
				$loader->register_shortcode( $value );
			}
		}

		add_action( 'plugins_loaded', array( $loader, 'run' ) );
	}
1217555
public function beginFooter($options = [])
    {
        $this->_setBeginning(true);
        $this->footerOptions = ArrayHelper::merge($this->footerOptions, $options);
        ob_start();
    }
527307
public static function boot()
    {
        parent::boot();

        self::creating(function ($user) {
            if (!$user->api_key) {
                $user->api_key = self::generateApiKey();
            }
        });
    }
981003
public function boot()
    {
        $this->loadRoutesFrom(__DIR__.'/routes.php');
        $this->loadViewsFrom(__DIR__.'/../views', 'larrock');
        $this->loadTranslationsFrom(__DIR__.'/../lang', 'larrock');
        $this->loadMigrationsFrom(__DIR__.'/../database/migrations');

        $public_path = public_path();
        if (substr($public_path, -6) === 'public') {
            $public_path .= '_html';
        }

        $this->publishes([
            __DIR__.'/../lang' => resource_path('lang/vendor/larrock'),
        ], 'lang');
        $this->publishes([
            __DIR__.'/../views/front' => base_path('resources/views/vendor/larrock/front'),
        ], 'views-front-core');
        $this->publishes([
            __DIR__.'/../views/admin' => base_path('resources/views/vendor/larrock/admin'),
        ], 'views-admin-core');
        $this->publishes([
            __DIR__.'/../assets/public_html' => $public_path,
            __DIR__.'/../assets/gulpfile' => base_path(),
            __DIR__.'/../assets/bower' => base_path(),
        ], 'assets');
        $this->publishes([
            __DIR__.'/../assets/policy' => $public_path,
        ], 'doc');
        $this->publishes([
            __DIR__.'/../config/larrock-core-adminmenu.php' => config_path('larrock-core-adminmenu.php'),
            __DIR__.'/../config/larrock-sitemap.php' => config_path('larrock-sitemap.php'),
            __DIR__.'/../config/larrock-to-dashboard.php' => config_path('larrock-to-dashboard.php'),
            __DIR__.'/../config/larrock.php' => config_path('larrock.php'),
        ], 'config');

        \Event::subscribe('Larrock\Core\Listeners\CoreEventSubscriber');
    }
861756
public function boot()
    {
        if ((php_sapi_name() === 'cli' || defined('STDIN'))) {
            return;
        }

        if (session_status() == PHP_SESSION_ACTIVE) {
            throw new Exception('Session is already started');
        }

        // save path
        if ($this->app->hasProp($this->sessionPropName.'.save_path')) {
            session_save_path($this->app->getProp($this->sessionPropName.'.save_path'));
        }

        // save handler class
        if ($this->app->hasProp($this->sessionPropName.'.save_handler')) {
            session_set_save_handler($this->app->getProp($this->sessionPropName.'.save_handler'));
        }

        // name the session
        if ($this->app->hasProp($this->sessionPropName.'.name')) {
            session_name($this->app->getProp($this->sessionPropName.'.name'));
        }

        // session options
        $options = [];
        if ($this->app->hasProp($this->sessionPropName.'.options')) {
            $options = $this->app->getProp($this->sessionPropName.'.options');
        }

        // start the session
        session_start($options);
    }
1014747
public function init()
	{
		$this->path    = $this->config('path');
		$this->baseURL = $this->config('baseURL');

        $this->errorsHandle();
		$this->autoloads();
	}