public static function setup()
    {
        if (static::$setup === false) {
            try {
                static::create_container();
                static::init_config();
                static::init_routing();
                static::init_services();
                static::add_wordpress_globals();

                // Run the loader.
                $loader = new Loader();
                $loader->boot();

                static::register_providers();
                static::init_templating();

                static::init_view();

                $classmap = null;
                $classmap_cache = \get_stylesheet_directory() . '/cache/config/' . \sha1(NONCE_SALT . 'classmap');

                if (WP_DEBUG === false && \file_exists($classmap_cache)) {
                    $classmap = \file_get_contents($classmap_cache);
                }

                $loader->load_theme($classmap);
            } catch (Exception $e) {
                throw new Startup_Exception($e->getMessage());
            }
        }

        static::$setup = true;
    }