TYPO3
7.6
|
Static Public Member Functions | |
static | usesComposerClassLoading () |
static | getInstance () |
Protected Member Functions | |
__construct ($applicationContext) | |
__clone () | |
sendResponse () | |
defineDatabaseConstants () | |
defineUserAgentConstant () | |
registerExtDirectComponents () | |
setCacheHashOptions () | |
setDefaultTimezone () | |
initializeL10nLocales () | |
convertPageNotFoundHandlingToBoolean () | |
initializeErrorHandling () | |
setMemoryLimit () | |
defineTypo3RequestTypes () | |
executeExtTablesAdditionalFile () | |
Protected Attributes | |
$requestId | |
$applicationContext | |
$earlyInstances = array() | |
$installToolPath | |
$availableRequestHandlers = array() | |
$response | |
Static Protected Attributes | |
static | $instance = null |
static | $usesComposerClassLoading = false |
This class encapsulates bootstrap related methods. It is required directly as the very first thing in entry scripts and used to define all base things like constants and pathes and so on.
Most methods in this class have dependencies to each other. They can not be called in arbitrary order. The methods are ordered top down, so a method at the beginning has lower dependencies than a method further down. Do not fiddle with the load order in own scripts except you know exactly what you are doing!
Definition at line 32 of file core/Classes/Core/Bootstrap.php.
|
protected |
Definition at line 87 of file core/Classes/Core/Bootstrap.php.
References Bootstrap\$applicationContext.
|
protected |
Disable direct cloning of this object.
Definition at line 104 of file core/Classes/Core/Bootstrap.php.
baseSetup | ( | $relativePathPart = '' | ) |
Run the base setup that checks server environment, determines pathes, populates base files and sets common configuration.
Script execution will be aborted if something fails here.
string | $relativePathPart | Relative path of entry script back to document root |
Definition at line 190 of file core/Classes/Core/Bootstrap.php.
References ClassLoadingInformation\isClassLoadingInformationAvailable(), GeneralUtility\presetApplicationContext(), ClassLoadingInformation\registerClassLoadingInformation(), and SystemEnvironmentBuilder\run().
checkBackendIpOrDie | ( | ) |
Compare client IP with IPmaskList and exit the script run if the client is not allowed to access the backend
Definition at line 889 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS, GeneralUtility\cmpIP(), and GeneralUtility\getIndpEnv().
checkIfEssentialConfigurationExists | ( | ) |
checks if LocalConfiguration.php or PackageStates.php is missing, used to see if a redirect to the install tool is needed
Definition at line 223 of file core/Classes/Core/Bootstrap.php.
References Bootstrap\setEarlyInstance().
checkLockedBackendAndRedirectOrDie | ( | $forceProceeding = false | ) |
Check adminOnly configuration variable and redirects to an URL in file typo3conf/LOCK_BACKEND or exit the script
\RuntimeException |
bool | $forceProceeding | if this option is set, the bootstrap will proceed even if the user is logged in (usually only needed for special AJAX cases, see AjaxRequestHandler) |
Definition at line 864 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS, and GeneralUtility\getUrl().
checkSslBackendAndRedirectIfNeeded | ( | ) |
Check lockSSL configuration variable and redirect to https version of the backend if needed
Definition at line 907 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS, $server, $url, and GeneralUtility\getIndpEnv().
configure | ( | ) |
Main entry point called at every request usually from Global scope. Checks if everything is correct, and loads the Configuration.
Make sure that the baseSetup() is called before and the class loader is present
Definition at line 167 of file core/Classes/Core/Bootstrap.php.
References Bootstrap\startOutputBuffering().
|
protected |
|
protected |
Define database constants
Definition at line 514 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS.
defineLoggingAndExceptionConstants | ( | ) |
Define logging and exception constants
Definition at line 764 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS.
|
protected |
Define TYPO3_REQUESTTYPE* constants so devs exactly know what type of request it is
Definition at line 734 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS.
|
protected |
Define user agent constant
Definition at line 533 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS.
disableCoreCache | ( | ) |
Set cache_core to null backend, effectively disabling eg. the cache for ext_localconf and PackageManager etc.
Definition at line 501 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS.
Referenced by Bootstrap\loadConfigurationAndInitialize().
endOutputBufferingAndCleanPreviousOutput | ( | ) |
Throw away all output that may have happened during bootstrapping by weird extensions
Definition at line 1163 of file core/Classes/Core/Bootstrap.php.
ensureClassLoadingInformationExists | ( | ) |
Writes class loading information if not yet present
Definition at line 436 of file core/Classes/Core/Bootstrap.php.
References ClassLoadingInformation\isClassLoadingInformationAvailable(), and ClassLoadingInformation\registerClassLoadingInformation().
Referenced by Bootstrap\loadConfigurationAndInitialize().
|
protected |
Execute TYPO3_extTableDef_script if defined and exists
Note: For backwards compatibility some global variables are explicitly set as global to be used without $GLOBALS[] in the extension table script. It is discouraged to access variables like $TBE_MODULES directly, but we can not prohibit this without heavily breaking backwards compatibility.
Definition at line 990 of file core/Classes/Core/Bootstrap.php.
References GeneralUtility\deprecationLog().
Referenced by Bootstrap\loadExtensionTables().
getApplicationContext | ( | ) |
Returns the application context this bootstrap was started in.
Definition at line 141 of file core/Classes/Core/Bootstrap.php.
References Bootstrap\$applicationContext.
getEarlyInstance | ( | $objectName | ) |
Returns an instance which was registered earlier through setEarlyInstance()
string | $objectName | Object name of the registered instance |
\TYPO3\CMS\Core\Exception |
Definition at line 354 of file core/Classes/Core/Bootstrap.php.
Referenced by Bootstrap\populateLocalConfiguration(), and Bootstrap\setFinalCachingFrameworkCacheConfiguration().
getEarlyInstances | ( | ) |
Returns all registered early instances indexed by object name
Definition at line 368 of file core/Classes/Core/Bootstrap.php.
References Bootstrap\$earlyInstances.
|
static |
Return 'this' as singleton
Definition at line 114 of file core/Classes/Core/Bootstrap.php.
References Bootstrap\$applicationContext.
Referenced by Application\__construct(), LogRecord\__construct(), UnitTestsBootstrap\finishCoreBootstrap(), ClassLoadingInformation\getClassLoader(), UnitTestsBootstrap\includeAndStartCoreBootstrap(), EidUtility\initTCA(), EnableFileService\isFirstInstallAllowed(), and ClassLoadingInformation\isTestingContext().
getRequestId | ( | ) |
Gets the request's unique ID
Definition at line 129 of file core/Classes/Core/Bootstrap.php.
References Bootstrap\$requestId.
handleRequest | ( | $request | ) |
Builds a Request instance from the current process, and then resolves the request through the request handlers depending on Frontend, Backend, CLI etc.
\Psr\Http\Message\RequestInterface | \Symfony\Component\Console\Input\InputInterface | $request |
\TYPO3\CMS\Core\Exception | |
\TYPO3\CMS\Extbase\Mvc\Exception\CommandException | Is thrown if the response object defined an exit code > 0 |
Definition at line 295 of file core/Classes/Core/Bootstrap.php.
initializeBackendAuthentication | ( | $proceedIfNoUserIsLoggedIn = false | ) |
Initializes and ensures authenticated access
Definition at line 1137 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS.
initializeBackendTemplate | ( | ) |
Provides an instance of "template" for backend-modules to work with.
Definition at line 1223 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS, and GeneralUtility\makeInstance().
initializeCachingFramework | ( | ) |
Initialize caching framework, and re-initializes it (e.g. in the install tool) by recreating the instances again despite the Singleton instance
Definition at line 578 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS, Bootstrap\setEarlyInstance(), and GeneralUtility\setSingletonInstance().
Referenced by Bootstrap\loadConfigurationAndInitialize().
initializeClassLoader | ( | $classLoader | ) |
Sets the class loader to the bootstrap
\Composer\Autoload\ClassLoader | $classLoader | an instance of the class loader |
Definition at line 207 of file core/Classes/Core/Bootstrap.php.
References Bootstrap\setEarlyInstance().
|
protected |
Configure and set up exception and error handling
\RuntimeException |
Definition at line 665 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS, GeneralUtility\cmpIP(), GeneralUtility\deprecationLog(), GeneralUtility\getIndpEnv(), and GeneralUtility\makeInstance().
|
protected |
Initialize the locales handled by TYPO3
Definition at line 638 of file core/Classes/Core/Bootstrap.php.
initializeOutputCompression | ( | ) |
Initialize output compression if configured
Definition at line 1175 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS, and MathUtility\canBeInterpretedAsInteger().
initializeSpriteManager | ( | ) |
Initialize sprite manager
Definition at line 1039 of file core/Classes/Core/Bootstrap.php.
loadConfigurationAndInitialize | ( | $allowCaching = true , |
|
$packageManagerClassName = \TYPO3\CMS\Core\Package\PackageManager::class |
|||
) |
Includes LocalConfiguration.php and sets several global settings depending on configuration.
bool | $allowCaching | Whether to allow caching - affects cache_core (autoloader) |
string | $packageManagerClassName | Define an alternative package manager implementation (usually for the installer) |
Definition at line 382 of file core/Classes/Core/Bootstrap.php.
References Bootstrap\disableCoreCache(), Bootstrap\ensureClassLoadingInformationExists(), Bootstrap\initializeCachingFramework(), and Bootstrap\populateLocalConfiguration().
loadExtensionTables | ( | $allowCaching = true | ) |
Load ext_tables and friends.
This will mainly set up $TCA and several other global arrays through API's like extMgm. Executes ext_tables.php files of loaded extensions or the according cache file if exists.
bool | $allowCaching | True, if reading compiled ext_tables file from cache is allowed |
Definition at line 969 of file core/Classes/Core/Bootstrap.php.
References Bootstrap\executeExtTablesAdditionalFile().
loadTypo3LoadedExtAndExtLocalconf | ( | $allowCaching = true | ) |
Load ext_localconf of extensions
bool | $allowCaching |
Definition at line 470 of file core/Classes/Core/Bootstrap.php.
populateLocalConfiguration | ( | ) |
We need an early instance of the configuration manager. Since makeInstance relies on the object configuration, we create it here with new instead.
Definition at line 483 of file core/Classes/Core/Bootstrap.php.
References Bootstrap\getEarlyInstance(), and Bootstrap\setEarlyInstance().
Referenced by Bootstrap\loadConfigurationAndInitialize().
redirectToInstallTool | ( | $relativePathPart = '' | ) |
Redirect to install tool if LocalConfiguration.php is missing.
Definition at line 235 of file core/Classes/Core/Bootstrap.php.
|
protected |
Register default ExtDirect components
Definition at line 544 of file core/Classes/Core/Bootstrap.php.
References ExtensionManagementUtility\extPath(), and ExtensionManagementUtility\registerExtDirectComponent().
registerRequestHandlerImplementation | ( | $requestHandler | ) |
Adds available request handlers usually done via an application from the outside.
string | $requestHandler | class which implements the request handler interface |
Definition at line 249 of file core/Classes/Core/Bootstrap.php.
sendHttpHeaders | ( | ) |
Send HTTP headers if configured
Definition at line 1192 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS.
|
protected |
Outputs content if there is a proper Response object.
Definition at line 311 of file core/Classes/Core/Bootstrap.php.
Referenced by Bootstrap\shutdown().
|
protected |
Set cacheHash options
Definition at line 596 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS, and GeneralUtility\trimExplode().
|
protected |
Set default timezone
Definition at line 616 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS.
setEarlyInstance | ( | $objectName, | |
$instance | |||
) |
Registers the instance of the specified object for an early boot stage. On finalizing the Object Manager initialization, all those instances will be transferred to the Object Manager's registry.
string | $objectName | Object name, as later used by the Object Manager |
object | $instance | The instance to register |
Definition at line 341 of file core/Classes/Core/Bootstrap.php.
References Bootstrap\$instance.
Referenced by Bootstrap\checkIfEssentialConfigurationExists(), Bootstrap\initializeCachingFramework(), Bootstrap\initializeClassLoader(), and Bootstrap\populateLocalConfiguration().
setFinalCachingFrameworkCacheConfiguration | ( | ) |
Extensions may register new caches, so we set the global cache array to the manager again at this point
Definition at line 752 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS, and Bootstrap\getEarlyInstance().
|
protected |
Set PHP memory limit depending on value of $GLOBALS['TYPO3_CONF_VARS']['SYS']['setMemoryLimit']
Definition at line 720 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS.
shutdown | ( | ) |
Things that should be performed to shut down the framework. This method is called in all important scripts for a clean shut down of the system.
Definition at line 1210 of file core/Classes/Core/Bootstrap.php.
References Bootstrap\sendResponse().
startOutputBuffering | ( | ) |
Prevent any unwanted output that may corrupt AJAX/compression. This does not interfere with "die()" or "echo"+"exit()" messages!
Definition at line 153 of file core/Classes/Core/Bootstrap.php.
Referenced by Bootstrap\configure().
unsetReservedGlobalVariables | ( | ) |
Unsetting reserved global variables: Those are set in "ext:core/ext_tables.php" file:
Definition at line 779 of file core/Classes/Core/Bootstrap.php.
References $GLOBALS.
|
static |
Definition at line 96 of file core/Classes/Core/Bootstrap.php.
Referenced by ListController\addComposerModeNotification(), ExtensionCommandController\dumpClassLoadingInformationCommand(), UploadExtensionFileController\extractAction(), TerUtility\fetchExtension(), UploadExtensionFileController\formAction(), AbstractModuleController\generateMenu(), SystemInformationToolbarItem\getComposerMode(), DefaultFactory\getDefaultStructureDefinition(), CoreUpdateService\isCoreUpdateEnabled(), and PackageManager\registerTransientClassLoadingInformationForPackage().
|
protected |
Definition at line 51 of file core/Classes/Core/Bootstrap.php.
Referenced by Bootstrap\__construct(), Bootstrap\getApplicationContext(), and Bootstrap\getInstance().
|
protected |
Definition at line 67 of file core/Classes/Core/Bootstrap.php.
|
protected |
Definition at line 56 of file core/Classes/Core/Bootstrap.php.
Referenced by Bootstrap\getEarlyInstances().
|
protected |
Definition at line 61 of file core/Classes/Core/Bootstrap.php.
|
staticprotected |
Definition at line 37 of file core/Classes/Core/Bootstrap.php.
Referenced by Bootstrap\setEarlyInstance().
|
protected |
Definition at line 44 of file core/Classes/Core/Bootstrap.php.
Referenced by Bootstrap\getRequestId().
|
protected |
Definition at line 74 of file core/Classes/Core/Bootstrap.php.
|
staticprotected |
Definition at line 79 of file core/Classes/Core/Bootstrap.php.