‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Core\Environment Class Reference

Static Public Member Functions

static initialize (ApplicationContext $context, bool $cli, bool $composerMode, string $projectPath, string $publicPath, string $varPath, string $configPath, string $currentScript, string $os)
 
static getContext ()
 
static isComposerMode ()
 
static isCli ()
 
static string getProjectPath ()
 
static string getComposerRootPath ()
 
static getPublicPath ()
 
static getVarPath ()
 
static getConfigPath ()
 
static getCurrentScript ()
 
static getLabelsPath ()
 
static getFrameworkBasePath ()
 
static getExtensionsPath ()
 
static getLegacyConfigPath ()
 
static isWindows ()
 
static isUnix ()
 
static isRunningOnCgiServer ()
 
static usesCgiFixPathInfo ()
 
static toArray ()
 

Static Protected Attributes

static array $supportedCgiServerApis
 
static bool $cli
 
static bool $composerMode
 
static ApplicationContext $context
 
static string $projectPath
 
static string $composerRootPath
 
static string $publicPath
 
static string $currentScript
 
static string $os
 
static string $varPath
 
static string $configPath
 

Detailed Description

This class is initialized once in the SystemEnvironmentBuilder, and can then be used throughout the application to access common variables related to path-resolving and OS-/PHP-application specific information.

It's main design goal is to remove any access to constants within TYPO3 code and to provide a static, for TYPO3 core and extensions non-changeable information.

This class does not contain any HTTP related information, as this is handled in NormalizedParams functionality.

All path-related methods do return the realpath to the paths without (!) the trailing slash.

This class only defines what is configured through the environment, does not do any checks if paths exist etc. This should be part of the application or the SystemEnvironmentBuilder.

In your application, use it like this: "Environment::isCli()"

Definition at line 40 of file Environment.php.

Member Function Documentation

◆ getComposerRootPath()

static string TYPO3\CMS\Core\Core\Environment::getComposerRootPath ( )
static

In most cases in composer-mode setups this is the same as project path. However since the project path is configurable, the paths may differ. In future versions this configurability will go away and this method will be removed. This path is only required for some internal path handling regarding package paths until then.

Returns
‪string The absolute path to the composer root directory without the trailing slash

Definition at line 174 of file Environment.php.

References TYPO3\CMS\Core\Core\Environment\$composerRootPath.

Referenced by TYPO3\CMS\Core\Utility\PathUtility\getAbsoluteWebPath().

◆ getConfigPath()

static TYPO3\CMS\Core\Core\Environment::getConfigPath ( )
static

The folder where all global (= installation-wide) configuration like

  • ‪system/settings.php and
  • ‪system/additional.php is put. This folder usually has to be writable for TYPO3 in order to work.

When project path = public path, then this folder is usually typo3conf/, otherwise it's set to $project_path/config.

Definition at line 212 of file Environment.php.

References TYPO3\CMS\Core\Core\Environment\$configPath.

Referenced by TYPO3\CMS\Impexp\Initialization\ImportSiteConfigurationsOnPackageInitialization\__invoke(), TYPO3\CMS\Backend\Command\ResetPasswordCommand\createFakeWebRequest(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\exceptionHandlerIsEnabledByDefaultInProductionContext(), TYPO3\CMS\Install\Service\EnableFileService\getBestLocationForInstallToolEnableFile(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\getCanonicalPathCorrectlyCleansPath(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\getDataWithApplicationContext(), TYPO3\CMS\Core\Tests\Functional\Resource\ResourceCompressorTest\getFilenamesFromMainDirInFrontendContext(), TYPO3\CMS\Install\Service\EnableFileService\getInstallToolEnableFilePath(), TYPO3\CMS\Install\Tests\Functional\Updates\MigrateSiteSettingsConfigUpdateTest\getSettingsFilePath(), TYPO3\CMS\Core\ServiceProvider\getSiteConfiguration(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\isAbsolutePathRespectsAllOperatingSystems(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\isInCurrentDomainIgnoresScheme(), TYPO3\CMS\Core\Tests\Functional\Resource\Driver\LocalDriverTest\publicUrlIsCalculatedCorrectlyWithDifferentBasePathsAndBasUris(), TYPO3\CMS\Install\Tests\Functional\Service\EnableFileServiceTest\removeInstallToolEnableFileRemovesAllAvailableFiles(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectReturnsFileFromPublicExtensionResourceWhenExtensionIsNotPublic(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectReturnsFileFromPublicFolderWhenProjectRootIsNotPublic(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectThrowsExceptionFromPrivateExtensionResourceWhenExtensionIsNotPublic(), TYPO3\CMS\Install\Service\SetupDatabaseService\setDefaultConnectionSettings(), TYPO3\CMS\Core\Tests\Functional\Security\ContentSecurityPolicy\PolicyProviderTest\setUp(), TYPO3\CMS\Core\Tests\Unit\Page\ImportMapTest\setUp(), TYPO3\CMS\Frontend\Tests\Functional\Imaging\GifBuilderTest\simulateCliRequestInComposerMode(), TYPO3\CMS\Backend\Command\ResetPasswordCommand\simulateEnvironmentForBackendEntryPoint(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityPublicPathsTest\simulateWebRequest(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\PathUtilityPublicPathsTest\simulateWebRequest(), TYPO3\CMS\Core\Core\Environment\toArray(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlClearsUrl(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlKeepsCleanUrl(), and TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlKeepsCleanUrlInSubdirectory().

◆ getContext()

static TYPO3\CMS\Core\Core\Environment::getContext ( )
static

Delivers the ApplicationContext object, usually defined in TYPO3_CONTEXT environment variables. This is something like "Production", "Testing", or "Development" or any additional information "Production/Staging".

Definition at line 128 of file Environment.php.

References TYPO3\CMS\Core\Core\Environment\$context.

Referenced by TYPO3\CMS\Core\Tests\Unit\Authentication\Mfa\Provider\Fixtures\Crypto\PasswordHashing\NoopPasswordHash\__construct(), TYPO3\CMS\Core\ExpressionLanguage\DefaultProvider\__construct(), TYPO3\CMS\Backend\Backend\ToolbarItems\SystemInformationToolbarItem\addApplicationContext(), TYPO3\CMS\Backend\Http\RouteDispatcher\assertSudoMode(), TYPO3\CMS\Core\DataHandling\DataHandler\clear_cacheCmd(), TYPO3\CMS\Core\Page\ImportMap\computeImportMaps(), TYPO3\CMS\Backend\Command\ResetPasswordCommand\createFakeWebRequest(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\determineExceptionHandlerClassName(), TYPO3\CMS\Install\Controller\EnvironmentController\getApplicationContextInformation(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\getCanonicalPathCorrectlyCleansPath(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getData(), TYPO3\CMS\Reports\Report\Status\SecurityStatus\getExceptionHandlerStatus(), TYPO3\CMS\Core\Tests\Functional\Resource\ResourceCompressorTest\getFilenamesFromMainDirInFrontendContext(), TYPO3\CMS\Core\Console\Application\getLongVersion(), TYPO3\CMS\Install\Configuration\Context\LivePreset\getPriority(), TYPO3\CMS\Install\Configuration\Context\DebugPreset\getPriority(), TYPO3\CMS\Core\Core\Bootstrap\init(), TYPO3\CMS\Install\Controller\LayoutController\initAction(), TYPO3\CMS\Install\Controller\InstallerController\initAction(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\isAbsolutePathRespectsAllOperatingSystems(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\isInCurrentDomainIgnoresScheme(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isSystemMaintainer(), TYPO3\CMS\Core\Core\ClassLoadingInformation\isTestingContext(), TYPO3\CMS\RteCKEditor\Form\Element\RichTextElement\prepareConfigurationForEditor(), TYPO3\CMS\Core\Tests\Functional\Resource\Driver\LocalDriverTest\publicUrlIsCalculatedCorrectlyWithDifferentBasePathsAndBasUris(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectReturnsFileFromPublicExtensionResourceWhenExtensionIsNotPublic(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectReturnsFileFromPublicFolderWhenProjectRootIsNotPublic(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectThrowsExceptionFromPrivateExtensionResourceWhenExtensionIsNotPublic(), TYPO3\CMS\Core\Tests\Functional\Security\ContentSecurityPolicy\PolicyProviderTest\setUp(), TYPO3\CMS\Core\Tests\Unit\Page\ImportMapTest\setUp(), TYPO3\CMS\Frontend\Tests\Functional\Imaging\GifBuilderTest\simulateCliRequestInComposerMode(), TYPO3\CMS\Backend\Command\ResetPasswordCommand\simulateEnvironmentForBackendEntryPoint(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityPublicPathsTest\simulateWebRequest(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\PathUtilityPublicPathsTest\simulateWebRequest(), TYPO3\CMS\Install\Controller\SettingsController\systemMaintainerGetListAction(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlClearsUrl(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlKeepsCleanUrl(), and TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlKeepsCleanUrlInSubdirectory().

◆ getCurrentScript()

static TYPO3\CMS\Core\Core\Environment::getCurrentScript ( )
static

◆ getExtensionsPath()

◆ getFrameworkBasePath()

◆ getLabelsPath()

static TYPO3\CMS\Core\Core\Environment::getLabelsPath ( )
static

◆ getLegacyConfigPath()

◆ getProjectPath()

static string TYPO3\CMS\Core\Core\Environment::getProjectPath ( )
static

The root path to the project. For installations set up via composer, this is the path where your composer.json file is stored. For non-composer-setups, this is (due to legacy reasons) the public web folder where the TYPO3 installation has been unzipped (something like htdocs/ or public/ on your webfolder). However, non-composer-mode installations define an environment variable called "TYPO3_PATH_APP" to define a different folder (usually a parent folder) to allow TYPO3 to access and store data outside of the public web folder.

Returns
‪string The absolute path to the project without the trailing slash

Definition at line 160 of file Environment.php.

References TYPO3\CMS\Core\Core\Environment\$projectPath.

Referenced by TYPO3\CMS\Install\Service\WebServerConfigurationFileService\__construct(), TYPO3\CMS\Core\Package\Cache\PackageDependentCacheIdentifier\__construct(), TYPO3\CMS\Core\Locking\FileLockStrategy\__construct(), TYPO3\CMS\Core\Locking\SemaphoreLockStrategy\__construct(), TYPO3\CMS\Core\Locking\SimpleLockStrategy\__construct(), TYPO3\CMS\Frontend\Tests\Functional\Imaging\GifBuilderTest\buildSimpleGifBuilderImageInComposerMode(), TYPO3\CMS\Core\Tests\Functional\Resource\Driver\LocalDriverTest\calculatedBasePathAbsoluteIsSane(), TYPO3\CMS\Core\Page\ImportMap\computeImportMaps(), TYPO3\CMS\Backend\Command\ResetPasswordCommand\createFakeWebRequest(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\exceptionHandlerIsEnabledByDefaultInProductionContext(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\getCanonicalPathCorrectlyCleansPath(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\getDataWithApplicationContext(), TYPO3\CMS\Install\FolderStructure\DefaultFactory\getDefaultStructureDefinition(), TYPO3\CMS\Core\Tests\Functional\Resource\ResourceCompressorTest\getFilenamesFromMainDirInFrontendContext(), TYPO3\CMS\Install\Report\InstallStatusReport\getFileSystemStatus(), TYPO3\CMS\Install\FolderStructure\AbstractNode\getRelativePathBelowSiteRoot(), TYPO3\CMS\Install\Controller\LayoutController\initAction(), TYPO3\CMS\Install\Controller\InstallerController\initAction(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\isAbsolutePathRespectsAllOperatingSystems(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\isInCurrentDomainIgnoresScheme(), TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer\renderContentElementPreviewFromFluidTemplate(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectReturnsFileFromPublicExtensionResourceWhenExtensionIsNotPublic(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectReturnsFileFromPublicFolderWhenProjectRootIsNotPublic(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectThrowsExceptionFromPrivateExtensionResourceWhenExtensionIsNotPublic(), TYPO3\CMS\Core\Cache\Backend\ApcuBackend\setCache(), TYPO3\CMS\Core\Cache\Backend\MemcachedBackend\setCache(), TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend\setCacheDirectory(), TYPO3\CMS\Install\Service\SetupDatabaseService\setDefaultConnectionSettings(), TYPO3\CMS\Core\Tests\Functional\Security\ContentSecurityPolicy\PolicyProviderTest\setUp(), TYPO3\CMS\Core\Tests\Unit\Page\ImportMapTest\setUp(), TYPO3\CMS\Frontend\Tests\Functional\Imaging\GifBuilderTest\simulateCliRequestInComposerMode(), TYPO3\CMS\Backend\Command\ResetPasswordCommand\simulateEnvironmentForBackendEntryPoint(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityPublicPathsTest\simulateWebRequest(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\PathUtilityPublicPathsTest\simulateWebRequest(), TYPO3\CMS\Core\Core\Environment\toArray(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlClearsUrl(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlKeepsCleanUrl(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlKeepsCleanUrlInSubdirectory(), and TYPO3\CMS\Core\Utility\GeneralUtility\writeFileToTypo3tempDir().

◆ getPublicPath()

static TYPO3\CMS\Core\Core\Environment::getPublicPath ( )
static

The public web folder where index.php (= the frontend application) is put, without trailing slash. For non-composer installations, the project path = the public path.

Definition at line 187 of file Environment.php.

References TYPO3\CMS\Core\Core\Environment\$publicPath.

Referenced by TYPO3\CMS\Install\Service\WebServerConfigurationFileService\__construct(), TYPO3\CMS\Core\Resource\LocalPath\__construct(), TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileLocation\__construct(), TYPO3\CMS\Impexp\ImportExport\addFiles(), TYPO3\CMS\Install\Tests\Functional\Service\WebServerConfigurationFileServiceTest\addWebServerSpecificBackendRoutingRewriteRulesTest(), TYPO3\CMS\Core\Tests\Functional\Resource\StorageRepositoryTest\bestStorageIsResolved(), TYPO3\CMS\Frontend\Tests\Functional\Imaging\GifBuilderTest\buildImageInCommandLineInterfaceAndComposerMode(), TYPO3\CMS\Frontend\Tests\Functional\Imaging\GifBuilderTest\buildImageWithMaskInCommandLineInterfaceAndComposerMode(), TYPO3\CMS\Frontend\Tests\Functional\Imaging\GifBuilderTest\buildSimpleGifBuilderImageInComposerMode(), TYPO3\CMS\Frontend\Tests\Functional\Authentication\FrontendUserAuthenticationTest\canCreateNewAndExistingSessionWithValidRequestToken(), TYPO3\CMS\Impexp\Import\checkOrCreateDir(), TYPO3\CMS\Install\Service\CoreUpdateService\checkPreConditions(), TYPO3\CMS\Install\Service\Typo3tempFileService\clearAssetsFolder(), TYPO3\CMS\Adminpanel\Modules\Info\GeneralInformation\collectImagesOnPage(), TYPO3\CMS\Core\Resource\ResourceCompressor\compressCssFile(), TYPO3\CMS\Core\Tests\Functional\Resource\ResourceCompressorTest\compressCssFileContent(), TYPO3\CMS\Core\Resource\ResourceCompressor\compressJsFile(), TYPO3\CMS\Core\Tests\Functional\Resource\ResourceCompressorTest\concatenateCssFiles(), TYPO3\CMS\Core\Tests\Functional\Resource\StorageRepositoryTest\copyFileCopiesMetadata(), TYPO3\CMS\Core\Tests\Functional\Resource\StorageRepositoryTest\copyFileGeneratesNewFileNameWhenFileAlreadyExistsInTargetFolderAndConflictModeIsRename(), TYPO3\CMS\Core\Tests\Functional\Resource\StorageRepositoryTest\copyFileThrowsErrorWhenFileWithSameNameAlreadyExistsInTargetFolderAndConflictModeIsCancel(), TYPO3\CMS\Core\Tests\Functional\Resource\StorageRepositoryTest\copyFolderGeneratesNewFolderNameWhenFolderAlreadyExistsInTargetFolderAndConflictModeIsRename(), TYPO3\CMS\Core\Tests\Functional\Resource\StorageRepositoryTest\copyFolderThrowsErrorWhenFolderAlreadyExistsInTargetFolderAndConflictModeIsCancel(), TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateGetDataAction(), TYPO3\CMS\Backend\Command\ResetPasswordCommand\createFakeWebRequest(), TYPO3\CMS\Fluid\ViewHelpers\Link\FileViewHelper\createFileDumpUrl(), TYPO3\CMS\Core\Http\NormalizedParams\createFromServerParams(), TYPO3\CMS\Core\Log\Writer\FileWriter\createLogFile(), TYPO3\CMS\Core\Resource\ResourceCompressor\createMergedFile(), TYPO3\CMS\Impexp\Tests\Functional\ExportTest\creationAndDeletionOfDefaultImportExportFolderSucceeds(), TYPO3\CMS\Core\Tests\Functional\Resource\StorageRepositoryTest\deleteFileMovesFileToRecyclerFolderIfAvailable(), TYPO3\CMS\Core\Tests\Functional\Resource\StorageRepositoryTest\deleteFileUnlinksFileIfNoRecyclerFolderAvailable(), TYPO3\CMS\Core\Tests\Functional\Resource\Driver\LocalDriverTest\determineBaseUrlUrlEncodesUriParts(), TYPO3\CMS\Install\Service\CoreUpdateService\discoverCurrentCoreSymlink(), TYPO3\CMS\Core\Core\ClassLoadingInformation\dumpClassLoadingInformation(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\exceptionHandlerIsEnabledByDefaultInProductionContext(), TYPO3\CMS\Impexp\Export\exportAddFilesFromRelations(), TYPO3\CMS\Impexp\Tests\Functional\Command\ExportCommandTest\exportCommandSavesExportWithGivenFileName(), TYPO3\CMS\Core\Tests\Unit\Utility\ExtensionManagementUtilityTest\extPathAppendsScriptNameToPath(), TYPO3\CMS\IndexedSearch\Tests\Unit\IndexerTest\extractHyperLinksFindsCorrectPathUsingAbsRefPrefix(), TYPO3\CMS\IndexedSearch\Tests\Unit\IndexerTest\extractHyperLinksFindsCorrectPathWithAbsolutePath(), TYPO3\CMS\IndexedSearch\Tests\Unit\IndexerTest\extractHyperLinksReturnsCorrectPathWithBaseUrl(), TYPO3\CMS\Install\Tests\Functional\UpgradeAnalysis\DocumentationFileTest\extractingTagsProvidesTagsAsDesired(), TYPO3\CMS\Install\Tests\Functional\UpgradeAnalysis\DocumentationFileTest\findDocumentationFilesReturnsArrayOfFilesForTheLastThreeMajorVersions(), TYPO3\CMS\Install\Tests\Functional\UpgradeAnalysis\DocumentationFileTest\findDocumentsRespectsFilesWithSameIssueNumber(), TYPO3\CMS\Impexp\Export\flatSoftRefs(), TYPO3\CMS\Install\Controller\EnvironmentController\folderStructureGetStatusAction(), TYPO3\CMS\Lowlevel\Service\CleanUpLocalProcessedFilesService\getAbsoluteBasePath(), TYPO3\CMS\Core\Utility\PathUtility\getAbsoluteWebPath(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\getCanonicalPathCorrectlyCleansPath(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\getDataWithApplicationContext(), TYPO3\CMS\Install\FolderStructure\DefaultFactory\getDefaultStructureDefinition(), TYPO3\CMS\Core\Core\Environment\getExtensionsPath(), TYPO3\CMS\Core\Resource\Processing\LocalCropScaleMaskHelper\getFilenameForImageCropScaleMask(), TYPO3\CMS\Core\Resource\ResourceCompressor\getFilenameFromMainDir(), TYPO3\CMS\Core\Tests\Functional\Resource\ResourceCompressorTest\getFilenamesFromMainDirInFrontendContext(), TYPO3\CMS\Install\Report\InstallStatusReport\getFileSystemStatus(), TYPO3\CMS\Install\Service\EnableFileService\getFirstInstallFilePaths(), TYPO3\CMS\Install\Tests\Functional\Service\EnableFileServiceTest\getFirstInstallFilePathsFindsValidFiles(), TYPO3\CMS\Install\Tests\Functional\Service\EnableFileServiceTest\getFirstInstallFilePathsReturnsEmptyArrayWithOnlyInvalidFiles(), TYPO3\CMS\Core\Resource\ResourceFactory\getFolderObjectFromCombinedIdentifier(), TYPO3\CMS\Core\Core\Environment\getFrameworkBasePath(), TYPO3\CMS\Backend\Form\Utility\FormEngineUtility\getIconHtml(), TYPO3\CMS\Frontend\Tests\Functional\Imaging\GifBuilderTest\getImageResourceInCommandLineInterfaceAndComposerMode(), TYPO3\CMS\Install\Controller\EnvironmentController\getImagesPath(), TYPO3\CMS\Core\Core\Environment\getLabelsPath(), TYPO3\CMS\Core\Core\Environment\getLegacyConfigPath(), TYPO3\CMS\Core\Tests\Functional\Resource\StorageRepositoryTest\getNestedProcessingFolderTest(), TYPO3\CMS\Core\Utility\PathUtility\getPublicResourceWebPath(), TYPO3\CMS\Core\Resource\ResourceStorage\getPublicUrl(), TYPO3\CMS\Install\Service\CoreUpdateService\getRelativePath(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\AbstractNodeTest\getRelativePathBelowSiteRootReturnsSingleForwardSlashIfGivenPathEqualsPathSiteConstant(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\AbstractNodeTest\getRelativePathBelowSiteRootReturnsSubPath(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\AbstractNodeTest\getRelativePathCallsGetAbsolutePathIfPathIsNull(), TYPO3\CMS\Backend\Controller\AbstractFormEngineAjaxController\getRelativePathToStylesheetFile(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\RootNodeTest\getStatusCallsGetChildrenStatusForStatus(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\getStatusReturnsArray(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\RootNodeTest\getStatusReturnsArrayWithOkStatusAndCallsOwnStatusMethods(), TYPO3\CMS\Core\Page\PageRenderer\getStreamlinedFileName(), TYPO3\CMS\Form\Slot\ResourcePublicationSlot\getStreamUrl(), TYPO3\CMS\Core\Resource\OnlineMedia\Helpers\AbstractOnlineMediaHelper\getTempFolderPath(), TYPO3\CMS\Frontend\Imaging\GifBuilder\gifBuild(), TYPO3\CMS\Backend\Tests\Functional\Controller\MfaConfigurationControllerTest\handleRequestRespectsReturnUrlTest(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingTrueTypeAction(), TYPO3\CMS\Impexp\Tests\Functional\Import\ImagesWithStoragesTest\importImagesWithStaticAndFallbackStorages(), TYPO3\CMS\Impexp\Tests\Functional\Import\ImagesWithStoragesTest\importMultipleImagesWithMultipleStorages(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentTest\importPagesAndRelatedTtContent(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInFilledDatabaseTest\importPagesAndRelatedTtContentCanEditFlexFormSoftReference(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInFilledDatabaseTest\importPagesAndRelatedTtContentCanKeepOriginalFlexFormSoftReference(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInFilledDatabaseTest\importPagesAndRelatedTtContentKeepsRelationBetweenImportedFlexFormSoftReferenceAndRelatedRecord(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInFilledDatabaseTest\importPagesAndRelatedTtContentWithDifferentImageToExistingData(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInEmptyDatabaseTest\importPagesAndRelatedTtContentWithImagesAndNewStorage(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInEmptyDatabaseTest\importPagesAndRelatedTtContentWithImagesButNotIncluded(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInEmptyDatabaseTest\importPagesAndRelatedTtContentWithImagesButWithoutStorageOnCaseInsensitiveFilesystems(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInEmptyDatabaseTest\importPagesAndRelatedTtContentWithImagesButWithoutStorageOnCaseSensitiveFilesystems(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInEmptyDatabaseTest\importPagesAndRelatedTtContentWithImagesOnCaseInsensitiveFilesystems(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInEmptyDatabaseTest\importPagesAndRelatedTtContentWithImagesOnCaseSensitiveFilesystems(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInEmptyDatabaseTest\importPagesAndRelatedTtContentWithImagesWithSpacesInPath(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInEmptyDatabaseTest\importPagesAndRelatedTtContentWithImageWithForcedUids(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithRteImagesAndFileLinkTest\importPagesAndRelatedTtContentWithRteImagesAndFileLink(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInFilledDatabaseTest\importPagesAndRelatedTtContentWithSameImageToExistingData(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInFilledDatabaseTest\importPagesAndTtContentWithRemappingNewSysFileEntries(), TYPO3\CMS\Core\Resource\ResourceCompressor\initialize(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\isAbsolutePathRespectsAllOperatingSystems(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\isFileReturnsFalseIfNameIsALinkFile(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\isInCurrentDomainIgnoresScheme(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\isRelativePathResolvedCorrectlyDataProvider(), TYPO3\CMS\Core\Tests\Functional\Resource\StorageRepositoryTest\isWithinFileMountBoundariesRespectsReadOnlyFileMounts(), TYPO3\CMS\Impexp\Tests\Functional\ImportTest\loadingFileFromWithinTypo3BaseFolderSucceeds(), TYPO3\CMS\Frontend\Resource\FilePathSanitizer\makeRelative(), TYPO3\CMS\Frontend\Tests\Functional\Imaging\GifBuilderTest\overlayImagesHasStableHash(), TYPO3\CMS\Core\Tests\Unit\Imaging\IconProvider\BitmapIconProviderTest\prepareIconMarkupWithAbsoluteSourceReturnsInstanceOfIconWithCorrectMarkup(), TYPO3\CMS\Core\Tests\Unit\Imaging\IconProvider\SvgIconProviderTest\prepareIconMarkupWithAbsoluteSourceReturnsInstanceOfIconWithCorrectMarkup(), TYPO3\CMS\Core\Tests\Unit\Imaging\IconProvider\SvgSpriteIconProviderTest\prepareIconMarkupWithAbsoluteSourceReturnsInstanceOfIconWithCorrectMarkup(), TYPO3\CMS\Frontend\Http\RequestHandler\processHtmlBasedRenderingSettings(), TYPO3\CMS\Impexp\Import\processSoftReferencesSaveFileCreateRelFile(), TYPO3\CMS\Core\Core\ClassLoadingInformation\registerTransientClassLoadingInformationForPackage(), TYPO3\CMS\Install\Service\EnableFileService\removeFirstInstallFile(), TYPO3\CMS\Install\Tests\Functional\Service\EnableFileServiceTest\removeFirstInstallFileRemovesNoFileIfThereAreNoValidFiles(), TYPO3\CMS\Install\Tests\Functional\Service\EnableFileServiceTest\removeFirstInstallFileRemovesValidFiles(), TYPO3\CMS\Core\Resource\ResourceStorage\renameFile(), TYPO3\CMS\Fluid\ViewHelpers\Debug\RenderViewHelper\render(), TYPO3\CMS\Core\Tests\Functional\Resource\StorageRepositoryTest\replaceFileFailsIfLocalFileDoesNotExist(), TYPO3\CMS\Core\LinkHandling\LegacyLinkNotationConverter\resolve(), TYPO3\CMS\Core\Resource\ResourceCompressor\retrieveExternalFile(), TYPO3\CMS\Core\Resource\ResourceFactory\retrieveFileOrFolderObject(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectCallsGetFolderObjectFromCombinedIdentifierWithAbsolutePath(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectReturnsFileFromPublicExtensionResourceWhenExtensionIsNotPublic(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectReturnsFileFromPublicFolderWhenProjectRootIsNotPublic(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectReturnsFileIfPathIsGiven(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectThrowsExceptionFromPrivateExtensionResourceWhenExtensionIsNotPublic(), TYPO3\CMS\Core\Resource\ResourceCompressor\returnFileReference(), TYPO3\CMS\Frontend\Resource\FilePathSanitizer\sanitize(), TYPO3\CMS\Impexp\Tests\Functional\ExportTest\saveT3dCompressedToFileSucceeds(), TYPO3\CMS\Impexp\Tests\Functional\ExportTest\saveT3dToFileSucceeds(), TYPO3\CMS\Impexp\Tests\Functional\ExportTest\saveToFileCleansUpFormerExportsOfSameName(), TYPO3\CMS\Impexp\Tests\Functional\ExportTest\saveToFileCleansUpTemporaryFolder(), TYPO3\CMS\Impexp\Tests\Functional\ExportTest\saveXmlToFileIsDefaultAndSucceeds(), TYPO3\CMS\Core\Tests\Functional\Resource\StorageRepositoryTest\searchFilesFindsFilesInFolder(), TYPO3\CMS\Install\Service\SetupDatabaseService\setDefaultConnectionSettings(), TYPO3\CMS\Install\Tests\Functional\UpgradeAnalysis\DocumentationFileTest\setUp(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\LinkNodeTest\setUp(), TYPO3\CMS\Core\Tests\Functional\Security\ContentSecurityPolicy\PolicyProviderTest\setUp(), TYPO3\CMS\Frontend\Tests\Functional\Imaging\GifBuilderTest\setupFullTestEnvironment(), TYPO3\CMS\Frontend\Tests\Functional\Imaging\GifBuilderTest\simulateCliRequestInComposerMode(), TYPO3\CMS\Backend\Command\ResetPasswordCommand\simulateEnvironmentForBackendEntryPoint(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\PathUtilityPublicPathsTest\simulateTraditionalWebRequest(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityPublicPathsTest\simulateTraditionalWebRequest(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\PathUtilityPublicPathsTest\simulateTraditionalWebRequestInSubDirectory(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityPublicPathsTest\simulateTraditionalWebRequestInSubDirectory(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityPublicPathsTest\simulateWebRequestInComposerMode(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityPublicPathsTest\simulateWebRequestInComposerModeInSubDirectory(), TYPO3\CMS\Install\Service\Typo3tempFileService\statsFromTypo3temp(), TYPO3\CMS\Install\Service\Typo3tempFileService\statsFromTypo3tempProcessed(), TYPO3\CMS\Core\Utility\PathUtility\stripPathSitePrefix(), TYPO3\CMS\Install\Tests\Functional\Service\EnableFileServiceTest\tearDown(), TYPO3\CMS\Core\Tests\Functional\Resource\StorageRepositoryTest\tearDown(), TYPO3\CMS\Fluid\Tests\Functional\ViewHelpers\Link\FileViewHelperTest\tearDown(), TYPO3\CMS\Install\Tests\Functional\UpgradeAnalysis\DocumentationFileTest\tearDown(), TYPO3\CMS\Core\Core\Environment\toArray(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInFilledDatabaseTest\updatePagesAndRelatedTtContentKeepsRelationsBetweenImportedPagesAndRecords(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInFilledDatabaseTest\updatePagesAndRelatedTtContentWithDifferentImageToExistingData(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInFilledDatabaseTest\updatePagesAndRelatedTtContentWithDifferentImageToExistingDataAndPagesAsNew(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlClearsUrl(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlKeepsCleanUrl(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlKeepsCleanUrlInSubdirectory(), TYPO3\CMS\Fluid\Tests\Functional\ViewHelpers\SvgImageViewHelperTest\verifySvg(), TYPO3\CMS\Core\Resource\ResourceCompressor\writeFileAndCompressed(), and TYPO3\CMS\Core\Utility\GeneralUtility\writeFileToTypo3tempDir().

◆ getVarPath()

static TYPO3\CMS\Core\Core\Environment::getVarPath ( )
static

The folder where variable data like logs, sessions, locks, and cache files can be stored. When project path = public path, then this folder is usually typo3temp/var/, otherwise it's set to $project_path/var.

Definition at line 197 of file Environment.php.

References TYPO3\CMS\Core\Core\Environment\$varPath.

Referenced by TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote\__construct(), TYPO3\CMS\Core\Locking\FileLockStrategy\__construct(), TYPO3\CMS\Core\Locking\SemaphoreLockStrategy\__construct(), TYPO3\CMS\Core\Locking\SimpleLockStrategy\__construct(), TYPO3\CMS\Install\Service\CoreUpdateService\__construct(), TYPO3\CMS\Core\Tests\Functional\Command\CacheFlushCommandTest\cachesCanBeFlushed(), TYPO3\CMS\Core\Tests\Functional\Command\CacheWarmupCommandTest\cachesCanBeWarmed(), TYPO3\CMS\Core\Tests\Functional\Resource\Driver\LocalDriverTest\calculatedBasePathAbsoluteIsSane(), TYPO3\CMS\Core\Tests\Unit\Locking\SimpleLockStrategyTest\constructorCreatesLockDirectoryIfNotExisting(), TYPO3\CMS\Core\Tests\Unit\Locking\FileLockStrategyTest\constructorCreatesLockDirectoryIfNotExisting(), TYPO3\CMS\Core\Tests\Unit\Locking\FileLockStrategyTest\constructorSetsFilePathToExpectedValue(), TYPO3\CMS\Core\Tests\Unit\Locking\SimpleLockStrategyTest\constructorSetsResourceToPathWithIdIfUsingSimpleLocking(), TYPO3\CMS\Extensionmanager\Controller\UploadExtensionFileController\copyExtensionFolderToTempFolder(), TYPO3\CMS\Extensionmanager\Tests\Unit\Controller\ActionControllerTest\createFakeExtension(), TYPO3\CMS\Backend\Command\ResetPasswordCommand\createFakeWebRequest(), TYPO3\CMS\Core\Tests\Unit\Configuration\ConfigurationManagerTest\createLocalConfigurationFromFactoryConfigurationWritesContentFromFactoryFile(), TYPO3\CMS\Core\Tests\Unit\Utility\ExtensionManagementUtilityTest\createMockPackageManagerWithMockPackage(), TYPO3\CMS\Core\Tests\Unit\Http\StreamFactoryTest\createStreamFromFileWithMissingFile(), TYPO3\CMS\Extensionmanager\Controller\ActionController\createZipFileFromExtension(), TYPO3\CMS\Extensionmanager\Tests\Unit\Controller\ActionControllerTest\createZipFileFromExtensionGeneratesCorrectArchive(), TYPO3\CMS\Core\Tests\Functional\Command\CacheFlushCommandTest\diCachesCanBeFlushed(), TYPO3\CMS\Core\Tests\Functional\Command\CacheWarmupCommandTest\diCachesDoesNotWarmSystemCaches(), TYPO3\CMS\Core\Tests\Unit\Type\File\ImageInfoTest\doesNotBreakOnImageInfoWithInvalidSvg(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\exceptionHandlerIsEnabledByDefaultInProductionContext(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\AbstractNodeTest\existsReturnsTrueIfIsLinkAndTargetIsDead(), TYPO3\CMS\Core\Tests\Functional\Resource\Driver\LocalDriverTest\filesCanBeCopiedToATemporaryPath(), TYPO3\CMS\Install\Service\EnableFileService\getBestLocationForInstallToolEnableFile(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\getCanonicalPathCorrectlyCleansPath(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\getDataWithApplicationContext(), TYPO3\CMS\Core\Log\Writer\FileWriter\getDefaultLogFileName(), TYPO3\CMS\Core\Tests\Functional\Resource\ResourceCompressorTest\getFilenamesFromMainDirInFrontendContext(), TYPO3\CMS\Install\Report\InstallStatusReport\getFileSystemStatus(), TYPO3\CMS\Install\Service\EnableFileService\getInstallToolEnableFilePath(), TYPO3\CMS\Core\Core\Environment\getLabelsPath(), TYPO3\CMS\Core\Tests\Unit\Mail\TransportFactoryTest\getReturnsMailerTransportInterface(), TYPO3\CMS\Core\Tests\Unit\Mail\TransportFactoryTest\getReturnsSpoolTransportUsingCustomSpool(), TYPO3\CMS\Core\Tests\Unit\Mail\TransportFactoryTest\getReturnsSpoolTransportUsingMemorySpool(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\AbstractFolderStructureTestCase\getTestDirectory(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\getTestDirectory(), TYPO3\CMS\Core\Tests\Unit\Http\StreamFactoryTest\getTestDirectory(), TYPO3\CMS\Core\Tests\Unit\Configuration\ConfigurationManagerTest\getTestDirectory(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\getTestDirectory(), TYPO3\CMS\Core\Tests\Unit\Mail\TransportFactoryTest\getThrowsRuntimeExceptionForInvalidCustomSpool(), TYPO3\CMS\Core\Charset\CharsetConverter\initCharset(), TYPO3\CMS\Core\Charset\CharsetConverter\initToASCII(), TYPO3\CMS\Core\Charset\CharsetConverter\initUnicodeData(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\isAbsolutePathRespectsAllOperatingSystems(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isDirectoryReturnsFalseIfNameIsALinkToADirectory(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\isInCurrentDomainIgnoresScheme(), TYPO3\CMS\Install\Service\LanguagePackService\languagePackDownload(), TYPO3\CMS\Core\Tests\Functional\Command\CacheFlushCommandTest\pageCachesCanBeFlushed(), TYPO3\CMS\Core\Tests\Functional\Resource\Driver\LocalDriverTest\publicUrlIsCalculatedCorrectlyWithDifferentBasePathsAndBasUris(), TYPO3\CMS\Core\Locking\SimpleLockStrategy\release(), TYPO3\CMS\Core\Tests\Unit\Locking\SimpleLockStrategyTest\releaseDoesNotRemoveFilesNotWithinTypo3TempLocksDirectoryDataProvider(), TYPO3\CMS\Install\Tests\Functional\Service\EnableFileServiceTest\removeInstallToolEnableFileRemovesAllAvailableFiles(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectReturnsFileFromPublicExtensionResourceWhenExtensionIsNotPublic(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectReturnsFileFromPublicFolderWhenProjectRootIsNotPublic(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectThrowsExceptionFromPrivateExtensionResourceWhenExtensionIsNotPublic(), TYPO3\CMS\Impexp\Tests\Functional\ExportTest\saveToFileCleansUpTemporaryFolder(), TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend\setCache(), TYPO3\CMS\Install\Service\SetupDatabaseService\setDefaultConnectionSettings(), TYPO3\CMS\Core\Tests\Unit\Mail\FileSpoolTest\setUp(), TYPO3\CMS\Core\Tests\Unit\Package\PackageTest\setUp(), TYPO3\CMS\Core\Tests\Unit\Log\Writer\FileWriterTest\setUp(), TYPO3\CMS\Core\Tests\Unit\Log\Writer\RotatingFileWriterTest\setUp(), TYPO3\CMS\Core\Tests\Functional\Security\ContentSecurityPolicy\PolicyProviderTest\setUp(), TYPO3\CMS\Core\Tests\Functional\Resource\Driver\LocalDriverTest\setUp(), TYPO3\CMS\Core\Tests\Unit\Page\ImportMapTest\setUp(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\setUp(), TYPO3\CMS\Core\Tests\Unit\Configuration\SiteConfigurationTest\setUp(), TYPO3\CMS\Frontend\Tests\Functional\Imaging\GifBuilderTest\simulateCliRequestInComposerMode(), TYPO3\CMS\Backend\Command\ResetPasswordCommand\simulateEnvironmentForBackendEntryPoint(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityPublicPathsTest\simulateWebRequest(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\PathUtilityPublicPathsTest\simulateWebRequest(), TYPO3\CMS\Core\Tests\Functional\Command\CacheFlushCommandTest\systemCachesCanBeFlushed(), TYPO3\CMS\Core\Tests\Functional\Command\CacheWarmupCommandTest\systemCachesCanBeWarmed(), TYPO3\CMS\Core\Tests\Functional\Command\CacheWarmupCommandTest\systemCachesCanBeWarmedIfCacheIsBroken(), TYPO3\CMS\Core\Tests\Functional\Resource\Driver\LocalDriverTest\tearDown(), TYPO3\CMS\Core\Core\Environment\toArray(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlClearsUrl(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlKeepsCleanUrl(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlKeepsCleanUrlInSubdirectory(), and TYPO3\CMS\Core\Utility\GeneralUtility\writeFileToTypo3tempDir().

◆ initialize()

static TYPO3\CMS\Core\Core\Environment::initialize ( ApplicationContext  $context,
bool  $cli,
bool  $composerMode,
string  $projectPath,
string  $publicPath,
string  $varPath,
string  $configPath,
string  $currentScript,
string  $os 
)
static

Sets up the Environment. Please note that this is not public API and only used within the very early Set up of TYPO3, or to be used within tests. If you ever call this method in your extension, you're probably doing something wrong. Never call this method! Never rely on it!

Definition at line 100 of file Environment.php.

References TYPO3\CMS\Core\Core\Environment\$cli, TYPO3\CMS\Core\Core\Environment\$composerMode, TYPO3\CMS\Core\Core\Environment\$configPath, TYPO3\CMS\Core\Core\Environment\$context, TYPO3\CMS\Core\Core\Environment\$currentScript, TYPO3\CMS\Core\Core\Environment\$os, TYPO3\CMS\Core\Core\Environment\$projectPath, TYPO3\CMS\Core\Core\Environment\$publicPath, TYPO3\CMS\Core\Core\Environment\$varPath, and TYPO3\CMS\Core\Utility\PathUtility\getCanonicalPath().

Referenced by TYPO3\CMS\Backend\Command\ResetPasswordCommand\createFakeWebRequest(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\exceptionHandlerIsEnabledByDefaultInProductionContext(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\getCanonicalPathCorrectlyCleansPath(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\getDataWithApplicationContext(), TYPO3\CMS\Core\Tests\Functional\Resource\ResourceCompressorTest\getFilenamesFromMainDirInFrontendContext(), TYPO3\CMS\Core\Core\SystemEnvironmentBuilder\initializeEnvironment(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\isAbsolutePathRespectsAllOperatingSystems(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\isInCurrentDomainIgnoresScheme(), TYPO3\CMS\Core\Tests\Functional\Resource\Driver\LocalDriverTest\publicUrlIsCalculatedCorrectlyWithDifferentBasePathsAndBasUris(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectReturnsFileFromPublicExtensionResourceWhenExtensionIsNotPublic(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectReturnsFileFromPublicFolderWhenProjectRootIsNotPublic(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectThrowsExceptionFromPrivateExtensionResourceWhenExtensionIsNotPublic(), TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\SiteDatabaseEditRowTest\setUp(), TYPO3\CMS\Core\Tests\Functional\Security\ContentSecurityPolicy\PolicyProviderTest\setUp(), TYPO3\CMS\Core\Tests\Unit\Page\ImportMapTest\setUp(), TYPO3\CMS\Frontend\Tests\Functional\Imaging\GifBuilderTest\simulateCliRequestInComposerMode(), TYPO3\CMS\Backend\Command\ResetPasswordCommand\simulateEnvironmentForBackendEntryPoint(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\PathUtilityPublicPathsTest\simulateWebRequest(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityPublicPathsTest\simulateWebRequest(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlClearsUrl(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlKeepsCleanUrl(), and TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlKeepsCleanUrlInSubdirectory().

◆ isCli()

◆ isComposerMode()

static TYPO3\CMS\Core\Core\Environment::isComposerMode ( )
static

Informs whether TYPO3 has been installed via composer or not. Typically this is useful inside the Maintenance Modules, or the Extension Manager.

Definition at line 137 of file Environment.php.

References TYPO3\CMS\Core\Core\Environment\$composerMode.

Referenced by TYPO3\CMS\Core\Core\ClassLoadingInformationUpdater\__invoke(), TYPO3\CMS\Backend\Backend\ToolbarItems\SystemInformationToolbarItem\addComposerMode(), TYPO3\CMS\Extensionmanager\Controller\ListController\addComposerModeNotification(), TYPO3\CMS\Core\Core\Bootstrap\baseSetup(), TYPO3\CMS\Core\Core\Bootstrap\checkIfEssentialConfigurationExists(), TYPO3\CMS\Core\ServiceProvider\configureCommands(), TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateGetDataAction(), TYPO3\CMS\Backend\Command\ResetPasswordCommand\createFakeWebRequest(), TYPO3\CMS\Core\Core\Bootstrap\createPackageCache(), TYPO3\CMS\Scheduler\Controller\SchedulerSetupCheckController\determineExecutablePath(), TYPO3\CMS\Extensionmanager\Controller\ActionController\downloadExtensionZipAction(), TYPO3\CMS\Install\Controller\MaintenanceController\dumpAutoloadAction(), TYPO3\CMS\Install\Controller\InstallerController\executeDefaultConfigurationAction(), TYPO3\CMS\Extensionmanager\Controller\UploadExtensionFileController\extractAction(), TYPO3\CMS\Extensionmanager\Controller\UploadExtensionFileController\formAction(), TYPO3\CMS\Core\Utility\PathUtility\getAbsoluteWebPath(), TYPO3\CMS\Install\Service\EnableFileService\getBestLocationForInstallToolEnableFile(), TYPO3\CMS\Install\Report\InstallStatusReport\getFileSystemStatus(), TYPO3\CMS\Extensionmanager\Utility\ListUtility\getInstallTypeForPackage(), TYPO3\CMS\Install\Service\EnableFileService\getStaticLocationForInstallToolEnableFileDirectory(), TYPO3\CMS\Scheduler\Controller\SchedulerSetupCheckController\handle(), TYPO3\CMS\Extensionmanager\Controller\ListController\indexAction(), TYPO3\CMS\Core\Core\Bootstrap\init(), TYPO3\CMS\Extensionmanager\Controller\AbstractController\initializeModuleTemplate(), TYPO3\CMS\Install\Controller\AbstractController\initializeView(), TYPO3\CMS\Extensionmanager\Updates\AbstractDownloadExtensionUpdate\installExtension(), TYPO3\CMS\Install\Service\CoreUpdateService\isCoreUpdateEnabled(), TYPO3\CMS\Extensionmanager\Command\DeactivateExtensionCommand\isEnabled(), TYPO3\CMS\Extensionmanager\Command\ActivateExtensionCommand\isEnabled(), TYPO3\CMS\Core\Command\DumpAutoloadCommand\isEnabled(), TYPO3\CMS\Core\Core\BootService\prepareContainer(), TYPO3\CMS\Core\Package\FailsafePackageManager\recreatePackageStatesFileIfMissing(), TYPO3\CMS\Extensionmanager\Controller\ListController\registerDocHeaderButtons(), TYPO3\CMS\Extensionmanager\Controller\ActionController\removeExtensionAction(), TYPO3\CMS\Extensionmanager\ViewHelpers\ToggleExtensionInstallationStateViewHelper\render(), TYPO3\CMS\Core\Tests\Unit\Page\ImportMapTest\setUp(), TYPO3\CMS\Install\Controller\InstallerController\showDefaultConfigurationAction(), TYPO3\CMS\Backend\Command\ResetPasswordCommand\simulateEnvironmentForBackendEntryPoint(), and TYPO3\CMS\Extensionmanager\Controller\ActionController\toggleExtensionInstallationStateAction().

◆ isRunningOnCgiServer()

static TYPO3\CMS\Core\Core\Environment::isRunningOnCgiServer ( )
static

Returns true if the server is running on a list of supported CGI server APIs.

Definition at line 292 of file Environment.php.

Referenced by TYPO3\CMS\Core\Core\SystemEnvironmentBuilder\getPathThisScriptNonCli(), and TYPO3\CMS\Install\Controller\EnvironmentController\systemInformationGetDataAction().

◆ isUnix()

static TYPO3\CMS\Core\Core\Environment::isUnix ( )
static

Whether this TYPO3 installation runs on unix (= non-windows machines)

Definition at line 284 of file Environment.php.

Referenced by TYPO3\CMS\Core\Tests\Functional\Resource\Driver\LocalDriverTest\publicUrlIsCalculatedCorrectlyWithDifferentBasePathsAndBasUris().

◆ isWindows()

static TYPO3\CMS\Core\Core\Environment::isWindows ( )
static

Whether this TYPO3 installation runs on windows

Definition at line 276 of file Environment.php.

Referenced by TYPO3\CMS\Core\Tests\Unit\Locking\SimpleLockStrategyTest\acquireFixesPermissionsOnLockFile(), TYPO3\CMS\Core\Utility\ExtensionManagementUtility\addService(), TYPO3\CMS\Core\Utility\CommandUtility\checkCommand(), TYPO3\CMS\Install\SystemEnvironment\SetupCheck\checkLocaleWithUTF8filesystem(), TYPO3\CMS\Install\Service\CoreUpdateService\checkPreConditions(), TYPO3\CMS\Install\SystemEnvironment\SetupCheck\checkSystemLocale(), TYPO3\CMS\Backend\Command\ResetPasswordCommand\createFakeWebRequest(), TYPO3\CMS\Core\Tests\Functional\Resource\Driver\LocalDriverTest\createFileFixesPermissionsOnCreatedFile(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\exceptionHandlerIsEnabledByDefaultInProductionContext(), TYPO3\CMS\Install\Configuration\Image\GraphicsMagickPreset\findGraphicsMagickInPaths(), TYPO3\CMS\Install\Configuration\Image\ImageMagick6Preset\findImageMagick6InPaths(), TYPO3\CMS\Core\Utility\GeneralUtility\fixPermissions(), TYPO3\CMS\Core\Utility\PathUtility\getCanonicalPath(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\getDataWithApplicationContext(), TYPO3\CMS\Core\Tests\Functional\Resource\ResourceCompressorTest\getFilenamesFromMainDirInFrontendContext(), TYPO3\CMS\Install\FolderStructure\DefaultPermissionsCheck\getMaskStatus(), TYPO3\CMS\Reports\Report\Status\ConfigurationStatus\getStatus(), TYPO3\CMS\Scheduler\Controller\SchedulerSetupCheckController\handle(), TYPO3\CMS\Core\Utility\CommandUtility\imageMagickCommand(), TYPO3\CMS\IndexedSearch\FileContentParser\initParser(), TYPO3\CMS\Core\Utility\PathUtility\isAbsolutePath(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\isInCurrentDomainIgnoresScheme(), TYPO3\CMS\Install\FolderStructure\AbstractNode\isWindowsOs(), TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility\removeDirectory(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectReturnsFileFromPublicExtensionResourceWhenExtensionIsNotPublic(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectReturnsFileFromPublicFolderWhenProjectRootIsNotPublic(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceFactoryTest\retrieveFileOrFolderObjectThrowsExceptionFromPrivateExtensionResourceWhenExtensionIsNotPublic(), TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend\setCacheDirectory(), TYPO3\CMS\Core\Tests\Functional\Security\ContentSecurityPolicy\PolicyProviderTest\setUp(), TYPO3\CMS\Core\Tests\Unit\Page\ImportMapTest\setUp(), TYPO3\CMS\Frontend\Tests\Functional\Imaging\GifBuilderTest\simulateCliRequestInComposerMode(), TYPO3\CMS\Backend\Command\ResetPasswordCommand\simulateEnvironmentForBackendEntryPoint(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityPublicPathsTest\simulateWebRequest(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\PathUtilityPublicPathsTest\simulateWebRequest(), TYPO3\CMS\Install\Controller\EnvironmentController\systemInformationGetDataAction(), TYPO3\CMS\Core\Core\Environment\toArray(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlClearsUrl(), TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlKeepsCleanUrl(), and TYPO3\CMS\FrontendLogin\Tests\Unit\Validation\RedirectUrlValidatorTest\validateRedirectUrlKeepsCleanUrlInSubdirectory().

◆ toArray()

◆ usesCgiFixPathInfo()

static TYPO3\CMS\Core\Core\Environment::usesCgiFixPathInfo ( )
static

Member Data Documentation

◆ $cli

bool TYPO3\CMS\Core\Core\Environment::$cli
staticprotected

◆ $composerMode

bool TYPO3\CMS\Core\Core\Environment::$composerMode
staticprotected

◆ $composerRootPath

string TYPO3\CMS\Core\Core\Environment::$composerRootPath
staticprotected

Definition at line 71 of file Environment.php.

Referenced by TYPO3\CMS\Core\Core\Environment\getComposerRootPath().

◆ $configPath

string TYPO3\CMS\Core\Core\Environment::$configPath
staticprotected

◆ $context

ApplicationContext TYPO3\CMS\Core\Core\Environment::$context
staticprotected

◆ $currentScript

string TYPO3\CMS\Core\Core\Environment::$currentScript
staticprotected

◆ $os

string TYPO3\CMS\Core\Core\Environment::$os
staticprotected

Definition at line 83 of file Environment.php.

Referenced by TYPO3\CMS\Core\Core\Environment\initialize().

◆ $projectPath

string TYPO3\CMS\Core\Core\Environment::$projectPath
staticprotected

◆ $publicPath

string TYPO3\CMS\Core\Core\Environment::$publicPath
staticprotected

◆ $supportedCgiServerApis

array TYPO3\CMS\Core\Core\Environment::$supportedCgiServerApis
staticprotected
Initial value:
= array(
'fpm-fcgi',
'cgi',
'isapi',
'cgi-fcgi',
'srv',
)

A list of supported CGI server APIs

Definition at line 45 of file Environment.php.

◆ $varPath

string TYPO3\CMS\Core\Core\Environment::$varPath
staticprotected