/** * 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->handleRequest(\TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals()); if ($execute !== null) { call_user_func($execute); } $this->bootstrap->shutdown(); }
/** * @test */ public function uploadedFilesAreNotCreatedIfTmpNameIsEmpty() { $_SERVER['HTTP_HOST'] = 'localhost'; $_SERVER['REQUEST_URI'] = '/index.php'; $_FILES = array('tx_uploadexample_piexample' => array('name' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0)); $uploadedFiles = ServerRequestFactory::fromGlobals()->getUploadedFiles(); $this->assertEmpty($uploadedFiles); }
/** * Set up the application and shut it down afterwards * * @param callable $execute * @return void */ public function run(callable $execute = NULL) { $this->bootstrap->handleRequest(\TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals()); if ($execute !== NULL) { if ($execute instanceof \Closure) { $execute->bindTo($this); } call_user_func($execute); } $this->bootstrap->shutdown(); }
/** * Set up the application and shut it down afterwards * * @param callable $execute * @return void */ public function run(callable $execute = null) { $this->request = \TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals(); // see below when this option is set and Bootstrap::defineTypo3RequestTypes() for more details if (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX) { $this->request = $this->request->withAttribute('isAjaxRequest', true); } elseif (isset($this->request->getQueryParams()['M'])) { $this->request = $this->request->withAttribute('isModuleRequest', true); } $this->bootstrap->handleRequest($this->request); if ($execute !== null) { call_user_func($execute); } $this->bootstrap->shutdown(); }
/** * 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); // can be done here after the base setup is done $this->defineAdditionalEntryPointRelatedConstants(); // Redirect to install tool if base configuration is not found if (!$this->bootstrap->checkIfEssentialConfigurationExists()) { $this->bootstrap->redirectToInstallTool($this->entryPointPath); } foreach ($this->availableRequestHandlers as $requestHandler) { $this->bootstrap->registerRequestHandlerImplementation($requestHandler); } $this->request = \TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals(); // see below when this option is set if ($GLOBALS['TYPO3_AJAX']) { $this->request = $this->request->withAttribute('isAjaxRequest', true); } elseif (isset($this->request->getQueryParams()['M'])) { $this->request = $this->request->withAttribute('isModuleRequest', true); } $this->bootstrap->configure(); }