Microweber\MicroweberServiceProvider::boot PHP Метод

boot() публичный Метод

public boot ( Illuminate\Http\Request $request )
$request Illuminate\Http\Request
    public function boot(Request $request)
    {
        parent::boot();
        // public = /
        App::instance('path.public', base_path());
        Cache::extend('file', function ($app) {
            return new Utils\Adapters\Cache\CacheStore();
        });
        // If installed load module functions and set locale
        if (mw_is_installed()) {
            $modules = load_all_functions_files_for_modules();
            $this->commands('Microweber\\Commands\\OptionCommand');
            $language = get_option('language', 'website');
            if ($language != false) {
                set_current_lang($language);
            }
            if ($this->app->runningInConsole()) {
                $this->commands('Microweber\\Commands\\UpdateCommand');
            }
        } else {
            // Otherwise register the install command
            $this->commands('Microweber\\Commands\\InstallCommand');
        }
        // Register routes
        $this->registerRoutes();
        $this->app->event_manager->trigger('mw.after.boot', $this);
    }