/** * Constructor setting up legacy constant and register available Request Handlers * * @param \Composer\Autoload\ClassLoader $classLoader an instance of the class loader */ public function __construct($classLoader) { $this->defineLegacyConstants(); $this->bootstrap = Bootstrap::getInstance()->initializeClassLoader($classLoader)->baseSetup($this->entryPointPath); foreach ($this->availableRequestHandlers as $requestHandler) { $this->bootstrap->registerRequestHandlerImplementation($requestHandler); } $this->bootstrap->startOutputBuffering()->loadConfigurationAndInitialize(false, \TYPO3\CMS\Core\Package\FailsafePackageManager::class); }
/** * Set up the application and shut it down afterwards * Failsafe minimal setup mode for the install tool * Does not call "run()" therefore * * @param callable $execute * @return void */ public function run(callable $execute = NULL) { $this->bootstrap->startOutputBuffering()->loadConfigurationAndInitialize(FALSE, \TYPO3\CMS\Core\Package\FailsafePackageManager::class)->handleRequest(); if ($execute !== NULL) { if ($execute instanceof \Closure) { $execute->bindTo($this); } call_user_func($execute); } $this->bootstrap->shutdown(); }