public function boot()
    {
        \spl_autoload_register(__NAMESPACE__ . '\Loader::class_autoload', true);
        \spl_autoload_register(__NAMESPACE__ . '\Loader::alias_autoload', true);

        static::$aliases = Config::get('services.aliases');

        if (\is_admin() || Request::is_wp_login()) {
            $this->class_list[] = \Snap\Admin\Whitelabel::class;
            $this->class_list[] = \Snap\Admin\Columns\Post_Template::class;
            $this->class_list[] = \Snap\Media\Admin::class;

            $this->conditional_load('admin.snap_admin_theme', 'Snap\Admin\Theme');
        } else {
            $this->class_list[] = \Snap\Http\Middleware\Is_Logged_In::class;
        }

        $this->conditional_load('theme.disable_comments', 'Snap\Admin\Disable_Comments');
        $this->conditional_load('theme.disable_customizer', 'Snap\Admin\Disable_Customizer');
        $this->conditional_load('theme.disable_tags', 'Snap\Admin\Disable_Tags');

        foreach ($this->class_list as $module) {
            Container::resolve($module)->run();
        }

        $this->init_widgets();

        // Now all core files are loaded, turn on output buffer until a view is dispatched.
        \ob_start();
    }
public function boot()
    {
        \spl_autoload_register(__NAMESPACE__ . '\Loader::class_autoload', true);
        \spl_autoload_register(__NAMESPACE__ . '\Loader::alias_autoload', true);

        static::$aliases = Config::get('services.aliases');

        if (\is_admin() || Request::is_wp_login()) {
            $this->class_list[] = \Snap\Admin\Whitelabel::class;
            $this->class_list[] = \Snap\Admin\Columns\Post_Template::class;
            $this->class_list[] = \Snap\Media\Admin::class;

            $this->conditional_load('admin.snap_admin_theme', 'Snap\Admin\Theme');
        } else {
            $this->class_list[] = \Snap\Http\Middleware\Is_Logged_In::class;
        }

        $this->conditional_load('theme.disable_comments', 'Snap\Admin\Disable_Comments');
        $this->conditional_load('theme.disable_customizer', 'Snap\Admin\Disable_Customizer');
        $this->conditional_load('theme.disable_tags', 'Snap\Admin\Disable_Tags');

        foreach ($this->class_list as $module) {
            Container::resolve($module)->run();
        }

        $this->init_widgets();

        // Now all core files are loaded, turn on output buffer until a view is dispatched.
        \ob_start();
    }
public function boot ( ) { \ spl_autoload_register ( __NAMESPACE__ . '\Loader::class_autoload' , true ) ; \ spl_autoload_register ( __NAMESPACE__ . '\Loader::alias_autoload' , true ) ; static :: $ aliases = Config :: get ( 'services.aliases' ) ; if ( \ is_admin ( ) || Request :: is_wp_login ( ) ) { $ this -> class_list [ ] = \ Snap \ Admin \ Whitelabel :: class ; $ this -> class_list [ ] = \ Snap \ Admin \ Columns \ Post_Template :: class ; $ this -> class_list [ ] = \ Snap \ Media \ Admin :: class ; $ this -> conditional_load ( 'admin.snap_admin_theme' , 'Snap\Admin\Theme' ) ; } else { $ this -> class_list [ ] = \ Snap \ Http \ Middleware \ Is_Logged_In :: class ; } $ this -> conditional_load ( 'theme.disable_comments' , 'Snap\Admin\Disable_Comments' ) ; $ this -> conditional_load ( 'theme.disable_customizer' , 'Snap\Admin\Disable_Customizer' ) ; $ this -> conditional_load ( 'theme.disable_tags' , 'Snap\Admin\Disable_Tags' ) ; foreach ( $ this -> class_list as $ module ) { Container :: resolve ( $ module ) -> run ( ) ; } $ this -> init_widgets ( ) ; // Now all core files are loaded, turn on output buffer until a view is dispatched. \ ob_start ( ) ; }
Includes all required Snap and theme files and register the Snap autoloader.

Initializes any Snap\Hookable classes.

@since 1.0.0

@throws \Exception
Includes all required Snap and theme files and register the Snap autoloader .