public function bootstrap( $config = [], $run = true ) {
		$this->renderConfigurationExceptions( function () use ( $config, $run ) {
			if ( $this->isBootstrapped() ) {
				throw new ConfigurationException( static::class . ' already bootstrapped.' );
			}

			$container = $this->getContainer();
			$this->loadConfig( $container, $config );
			$this->loadServiceProviders( $container );
			$this->loadRoutes(
				Arr::get( $config, 'routes.web', '' ),
				Arr::get( $config, 'routes.admin', '' ),
				Arr::get( $config, 'routes.ajax', '' )
			);

			$this->bootstrapped = true;

			if ( $run ) {
				$kernel = $this->resolve( WPEMERGE_WORDPRESS_HTTP_KERNEL_KEY );
				$kernel->bootstrap();
			}
		} );
	}
public function bootstrap( $config = [], $run = true ) {
		$this->renderConfigurationExceptions( function () use ( $config, $run ) {
			if ( $this->isBootstrapped() ) {
				throw new ConfigurationException( static::class . ' already bootstrapped.' );
			}

			$container = $this->getContainer();
			$this->loadConfig( $container, $config );
			$this->loadServiceProviders( $container );
			$this->loadRoutes(
				Arr::get( $config, 'routes.web', '' ),
				Arr::get( $config, 'routes.admin', '' ),
				Arr::get( $config, 'routes.ajax', '' )
			);

			$this->bootstrapped = true;

			if ( $run ) {
				$kernel = $this->resolve( WPEMERGE_WORDPRESS_HTTP_KERNEL_KEY );
				$kernel->bootstrap();
			}
		} );
	}
public function bootstrap ( $ config = [ ] , $ run = true ) { $ this -> renderConfigurationExceptions ( function ( ) use ( $ config , $ run ) { if ( $ this -> isBootstrapped ( ) ) { throw new ConfigurationException ( static :: class . ' already bootstrapped.' ) ; } $ container = $ this -> getContainer ( ) ; $ this -> loadConfig ( $ container , $ config ) ; $ this -> loadServiceProviders ( $ container ) ; $ this -> loadRoutes ( Arr :: get ( $ config , 'routes.web' , '' ) , Arr :: get ( $ config , 'routes.admin' , '' ) , Arr :: get ( $ config , 'routes.ajax' , '' ) ) ; $ this -> bootstrapped = true ; if ( $ run ) { $ kernel = $ this -> resolve ( WPEMERGE_WORDPRESS_HTTP_KERNEL_KEY ) ; $ kernel -> bootstrap ( ) ; } } ) ; }
Bootstrap the application.
WordPress' 'after_setup_theme' action is a good place to call this.

@param  array   $config
@param  boolean $run
@return void
Bootstrap the application . WordPress after_setup_theme action is a good place to call this .