/** * Set the ApplicationContext * * This function is used by the Bootstrap to hand over the application context. It must not be used anywhere else, * because the context shall never be changed on runtime! * * @param \TYPO3\CMS\Core\Core\ApplicationContext $applicationContext * @throws \RuntimeException if applicationContext is overriden * @internal This is not a public API method, do not use in own extensions */ public static function presetApplicationContext(\TYPO3\CMS\Core\Core\ApplicationContext $applicationContext) { if (is_null(static::$applicationContext)) { static::$applicationContext = $applicationContext; } else { throw new \RuntimeException('Trying to override applicationContext which has already been defined!', 1376084316); } }
/** * @param \TYPO3\CMS\Core\Core\ApplicationContext $applicationContext * @return void */ static public function setApplicationContext($applicationContext) { static::$applicationContext = $applicationContext; }