‪TYPO3CMS  9.5
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 ApplicationContext getContext ()
 
static bool isComposerMode ()
 
static bool isCli ()
 
static string getProjectPath ()
 
static string getPublicPath ()
 
static string getVarPath ()
 
static string getConfigPath ()
 
static string getCurrentScript ()
 
static string getLabelsPath ()
 
static string getBackendPath ()
 
static string getFrameworkBasePath ()
 
static string getExtensionsPath ()
 
static string getLegacyConfigPath ()
 
static bool isWindows ()
 
static bool isUnix ()
 
static bool isRunningOnCgiServer ()
 

Static Protected Attributes

static array $supportedCgiServerApis
 
static $cli
 
static $composerMode
 
static $context
 
static $projectPath
 
static $publicPath
 
static $currentScript
 
static $os
 
static $varPath
 
static $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:

Instead of writing "PATH_site" call "Environment::getPublicPath() . '/'" Instead of writing "TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI" call "Environment::isCli()"

Definition at line 38 of file Environment.php.

Member Function Documentation

◆ getBackendPath()

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

Previously known as PATH_typo3 Please note that this might be gone at some point

Returns
‪string

Definition at line 223 of file Environment.php.

References TYPO3\CMS\Core\Core\Environment\getPublicPath().

Referenced by TYPO3\CMS\Frontend\Resource\FilePathSanitizer\__construct(), TYPO3\CMS\Core\Resource\ResourceCompressor\__construct(), TYPO3\CMS\Backend\Routing\UriBuilder\buildUri(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorIntegrationTest\concatenateCssFilesWorksWithFileFromNonRootPath(), TYPO3\CMS\Frontend\Tests\Unit\Typolink\AbstractTypolinkBuilderTest\forceAbsoluteUrlReturnsCorrectAbsoluteUrl(), TYPO3\CMS\Frontend\Tests\Unit\Typolink\AbstractTypolinkBuilderTest\forceAbsoluteUrlReturnsCorrectAbsoluteUrlWithSubfolder(), TYPO3\CMS\Core\Resource\ResourceCompressor\getFilenameFromMainDir(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInBackendContext(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInBackendContextWithSubFolder(), TYPO3\CMS\Install\Report\InstallStatusReport\getFileSystemStatus(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\getIndpEnvTypo3SitePathReturnsStringStartingWithSlash(), TYPO3\CMS\Core\Localization\Parser\AbstractXmlParser\getLocalizedFileName(), TYPO3\CMS\Fluid\ViewHelpers\Debug\RenderViewHelper\render(), TYPO3\CMS\Extensionmanager\Domain\Model\Extension\returnInstallPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsEncodedValidPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsEncodedValidUrls(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsNotEncodedValidPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsNotEncodedValidUrls(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlDeniesPlainInvalidUrlsInBackendContext(), TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController\set_no_cache(), TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController\setAbsRefPrefix(), and TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\setUpFakeSitePathAndHost().

◆ getConfigPath()

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

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

  • ‪LocalConfiguration.php,
  • AdditionalConfiguration.php, and
  • ‪PackageStates.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.

Returns
‪string

Definition at line 183 of file Environment.php.

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

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\SiteDatabaseEditRow\__construct(), TYPO3\CMS\Core\Site\SiteFinder\__construct(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorIntegrationTest\concatenateCssFilesWorksWithFileFromNonRootPath(), TYPO3\CMS\Install\Controller\InstallerController\createSiteConfiguration(), TYPO3\CMS\Backend\Controller\SiteConfigurationController\deleteAction(), TYPO3\CMS\Install\Controller\InstallerController\executeDatabaseConnectAction(), TYPO3\CMS\Frontend\Tests\Unit\Typolink\AbstractTypolinkBuilderTest\forceAbsoluteUrlReturnsCorrectAbsoluteUrl(), TYPO3\CMS\Frontend\Tests\Unit\Typolink\AbstractTypolinkBuilderTest\forceAbsoluteUrlReturnsCorrectAbsoluteUrlWithSubfolder(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\getCanonicalPathCorrectlyCleansPath(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInBackendContext(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInBackendContextWithSubFolder(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInFrontendContext(), TYPO3\CMS\Install\Tests\Unit\Service\EnableFileServiceTest\getFirstInstallFilePaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\getIndpEnvTypo3SitePathReturnsStringStartingWithSlash(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\isAbsolutePathRespectsAllOperatingSystems(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\locationHeaderUrl(), TYPO3\CMS\Install\Tests\Unit\Service\EnableFileServiceTest\removeFirstInstallFile(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsEncodedValidPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsEncodedValidUrls(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsNotEncodedValidPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsNotEncodedValidUrls(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlDeniesPlainInvalidUrlsInBackendContext(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlDeniesPlainInvalidUrlsInFrontendContext(), TYPO3\CMS\Backend\Controller\SiteConfigurationController\saveAction(), and TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\setUpFakeSitePathAndHost().

◆ getContext()

static ApplicationContext 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".

Returns
ApplicationContext

Definition at line 106 of file Environment.php.

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

Referenced by TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorIntegrationTest\concatenateCssFilesWorksWithFileFromNonRootPath(), TYPO3\CMS\Install\Tests\Functional\Controller\BackendModuleControllerTest\environmentContextIsRespectedTest(), TYPO3\CMS\Frontend\Tests\Unit\Typolink\AbstractTypolinkBuilderTest\forceAbsoluteUrlReturnsCorrectAbsoluteUrl(), TYPO3\CMS\Frontend\Tests\Unit\Typolink\AbstractTypolinkBuilderTest\forceAbsoluteUrlReturnsCorrectAbsoluteUrlWithSubfolder(), TYPO3\CMS\Install\Controller\BackendModuleController\getBackendUserConfirmationRedirect(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\getCanonicalPathCorrectlyCleansPath(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInBackendContext(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInBackendContextWithSubFolder(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInFrontendContext(), TYPO3\CMS\Install\Tests\Unit\Service\EnableFileServiceTest\getFirstInstallFilePaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\getIndpEnvTypo3SitePathReturnsStringStartingWithSlash(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\isAbsolutePathRespectsAllOperatingSystems(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\locationHeaderUrl(), TYPO3\CMS\Install\Tests\Unit\Service\EnableFileServiceTest\removeFirstInstallFile(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsEncodedValidPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsEncodedValidUrls(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsNotEncodedValidPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsNotEncodedValidUrls(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlDeniesPlainInvalidUrlsInBackendContext(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlDeniesPlainInvalidUrlsInFrontendContext(), and TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\setUpFakeSitePathAndHost().

◆ getCurrentScript()

◆ getExtensionsPath()

◆ getFrameworkBasePath()

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

Previously known as PATH_typo3 . 'sysext/' Please note that this might be gone at some point

Returns
‪string

Definition at line 234 of file Environment.php.

References TYPO3\CMS\Core\Core\Environment\getPublicPath().

Referenced by TYPO3\CMS\Core\Controller\ErrorPageController\__construct(), TYPO3\CMS\Frontend\Resource\FilePathSanitizer\__construct(), TYPO3\CMS\Install\Controller\EnvironmentController\convertImageFormatsToJpg(), TYPO3\CMS\Core\Tests\Unit\Configuration\ConfigurationManagerTest\createLocalConfigurationFromFactoryConfigurationMergesConfigurationWithAdditionalFactoryFile(), TYPO3\CMS\Core\Tests\Unit\Configuration\ConfigurationManagerTest\createLocalConfigurationFromFactoryConfigurationWritesContentFromFactoryFile(), TYPO3\CMS\Core\Controller\ErrorPageController\errorAction(), TYPO3\CMS\Install\FolderStructure\DefaultFactory\getDefaultStructureDefinition(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\getFileAbsFileNameDateprovider(), TYPO3\CMS\Core\Tests\Unit\Localization\Parser\LocallangXmlParserTest\getFixtureFilePath(), TYPO3\CMS\Core\Localization\Parser\AbstractXmlParser\getLocalizedFileName(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingCombineGifMaskAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingCombineJpgMaskAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibFromFileAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibNiceTextAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibNiceTextShadowAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibRenderTextAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibSimpleAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGifToGifAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGifToJpgAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingPngToPngAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingTrueTypeAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingWriteGifAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingWritePngAction(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInEmptyDatabaseTest\importPagesAndRelatedTtContentWithImagesButNotIncluded(), TYPO3\CMS\Frontend\Tests\Functional\ContentObject\GifBuilderTest\overlayImagesHasStableHash(), TYPO3\CMS\Fluid\ViewHelpers\Debug\RenderViewHelper\render(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\FluidTemplateContentObjectTest\renderSetsTemplateFileInView(), TYPO3\CMS\Extensionmanager\Domain\Model\Extension\returnInstallPaths(), TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController\setAbsRefPrefix(), and TYPO3\CMS\Core\Tests\Unit\Localization\Parser\XliffParserTest\setUp().

◆ getLabelsPath()

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

Helper methods to easily find occurrences, however as these properties are not computed it is very possible that these methods will become obsolete in the near future. Previously found under typo3conf/l10n/ Please note that this might be gone at some point

Returns
‪string

Definition at line 209 of file Environment.php.

References TYPO3\CMS\Core\Core\Environment\getPublicPath(), and TYPO3\CMS\Core\Core\Environment\getVarPath().

Referenced by TYPO3\CMS\Install\Service\LanguagePackService\getExtensionLanguagePackDetails(), TYPO3\CMS\Install\Report\InstallStatusReport\getFileSystemStatus(), TYPO3\CMS\Core\Localization\Parser\AbstractXmlParser\getLocalizedFileName(), TYPO3\CMS\Install\Service\LanguagePackService\languagePackDownload(), and TYPO3\CMS\Setup\Controller\SetupModuleController\renderLanguageSelect().

◆ getLegacyConfigPath()

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

Previously known as PATH_typo3conf Please note that this might be gone at some point

Returns
‪string

Definition at line 256 of file Environment.php.

References TYPO3\CMS\Core\Core\Environment\getPublicPath().

Referenced by TYPO3\CMS\Core\Tests\Unit\Configuration\ConfigurationManagerTest\canWriteConfigurationReturnsFalseIfLocalConfigurationFileIsNotWritable(), TYPO3\CMS\Backend\Http\Application\checkIfEssentialConfigurationExists(), TYPO3\CMS\Frontend\Http\Application\checkIfEssentialConfigurationExists(), TYPO3\CMS\Core\Core\Bootstrap\checkIfEssentialConfigurationExists(), TYPO3\CMS\Backend\Middleware\LockedBackendGuard\checkLockedBackend(), TYPO3\CMS\Core\Tests\Unit\Configuration\ConfigurationManagerTest\createLocalConfigurationFromFactoryConfigurationMergesConfigurationWithAdditionalFactoryFile(), TYPO3\CMS\Core\Tests\Unit\Configuration\ConfigurationManagerTest\createLocalConfigurationFromFactoryConfigurationThrowsExceptionIfFileExists(), TYPO3\CMS\Install\Controller\InstallerController\executeEnvironmentAndFoldersAction(), TYPO3\CMS\Core\Core\ClassLoadingInformation\getClassLoadingInformationDirectory(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\getDirsReturnsArrayOfDirectoriesFromGivenDirectory(), TYPO3\CMS\Backend\Command\UnlockBackendCommand\getLockFileName(), TYPO3\CMS\Backend\Command\LockBackendCommand\getLockFileName(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\invalidFilePathForTypo3tempDirDataProvider(), TYPO3\CMS\Backend\Controller\AjaxLoginController\isTimedOutAction(), and TYPO3\CMS\Install\Http\RequestHandler\recreatePackageStatesFileIfMissing().

◆ 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 142 of file Environment.php.

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

Referenced by TYPO3\CMS\Core\Page\PageRenderer\computeRequireJsConfig(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorIntegrationTest\concatenateCssFilesWorksWithFileFromNonRootPath(), TYPO3\CMS\Install\Controller\InstallerController\executeDatabaseConnectAction(), TYPO3\CMS\Frontend\Tests\Unit\Typolink\AbstractTypolinkBuilderTest\forceAbsoluteUrlReturnsCorrectAbsoluteUrl(), TYPO3\CMS\Frontend\Tests\Unit\Typolink\AbstractTypolinkBuilderTest\forceAbsoluteUrlReturnsCorrectAbsoluteUrlWithSubfolder(), TYPO3\CMS\T3editor\T3editor\generateCacheIdentifier(), TYPO3\CMS\Core\Utility\ExtensionManagementUtility\getBaseTcaCacheIdentifier(), TYPO3\CMS\Core\Imaging\IconRegistry\getCachedBackendIcons(), TYPO3\CMS\Core\Http\MiddlewareStackResolver\getCacheIdentifier(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\getCanonicalPathCorrectlyCleansPath(), TYPO3\CMS\Core\Utility\ExtensionManagementUtility\getExtLocalconfCacheIdentifier(), TYPO3\CMS\Core\Utility\ExtensionManagementUtility\getExtTablesCacheIdentifier(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInBackendContext(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInBackendContextWithSubFolder(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInFrontendContext(), TYPO3\CMS\Install\Report\InstallStatusReport\getFileSystemStatus(), TYPO3\CMS\Install\Tests\Unit\Service\EnableFileServiceTest\getFirstInstallFilePaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\getIndpEnvTypo3SitePathReturnsStringStartingWithSlash(), TYPO3\CMS\Core\Core\Bootstrap\initializeBackendRouter(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\isAbsolutePathRespectsAllOperatingSystems(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\locationHeaderUrl(), TYPO3\CMS\Install\Tests\Unit\Service\EnableFileServiceTest\removeFirstInstallFile(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsEncodedValidPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsEncodedValidUrls(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsNotEncodedValidPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsNotEncodedValidUrls(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlDeniesPlainInvalidUrlsInBackendContext(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlDeniesPlainInvalidUrlsInFrontendContext(), TYPO3\CMS\Core\Cache\Backend\ApcBackend\setCache(), TYPO3\CMS\Core\Cache\Backend\ApcuBackend\setCache(), TYPO3\CMS\Core\Cache\Backend\MemcachedBackend\setCache(), TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend\setCacheDirectory(), TYPO3\CMS\Core\Tests\Unit\Cache\Backend\FileBackendTest\setCacheDirectoryAllowsRelativeDottedPathWithoutTrailingSlash(), TYPO3\CMS\Core\Tests\Unit\Cache\Backend\FileBackendTest\setCacheDirectoryAllowsRelativeDottedPathWithTrailingSlash(), TYPO3\CMS\Core\Tests\Unit\Cache\Backend\FileBackendTest\setCacheDirectoryAllowsRelativePathWithoutTrailingSlash(), TYPO3\CMS\Core\Tests\Unit\Cache\Backend\FileBackendTest\setCacheDirectoryAllowsRelativePathWithTrailingSlash(), and TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\setUpFakeSitePathAndHost().

◆ getPublicPath()

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

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

Returns
‪string

Definition at line 153 of file Environment.php.

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

Referenced by TYPO3\CMS\Install\SystemEnvironment\ServerResponse\FileLocation\__construct(), TYPO3\CMS\Core\Resource\LocalPath\__construct(), TYPO3\CMS\Core\Resource\ResourceCompressor\__construct(), TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\TcaSelectItemsTest\addDataAddsFileItemsWithConfiguredFileFolder(), TYPO3\CMS\Core\Tests\Functional\Resource\ResourceFactoryTest\bestStorageIsResolved(), TYPO3\CMS\Core\Resource\Driver\LocalDriver\calculateBasePath(), TYPO3\CMS\Core\Tests\Unit\Configuration\ConfigurationManagerTest\canWriteConfigurationReturnsTrueIfDirectoryAndFilesAreWritable(), TYPO3\CMS\Impexp\Import\checkOrCreateDir(), TYPO3\CMS\Install\Service\CoreUpdateService\checkPreConditions(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_group_select_file(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\cImage(), TYPO3\CMS\Install\Service\Typo3tempFileService\clearAssetsFolder(), TYPO3\CMS\Impexp\Tests\Functional\Export\GroupFileAndFileReferenceItemTest\compileExportGroupFileAndFileReferenceItem(), TYPO3\CMS\Core\Resource\ResourceCompressor\compressCssFile(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\compressCssFileContent(), TYPO3\CMS\Core\Resource\ResourceCompressor\compressJsFile(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorIntegrationTest\concatenateCssFiles(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorIntegrationTest\concatenateCssFilesWorksWithFileFromNonRootPath(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorIntegrationTest\constructorCreatesHtaccessFileIfSet(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorIntegrationTest\constructorCreatesTargetDirectory(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorIntegrationTest\constructorDoesNotCreateHtaccessFileIfSetToFalse(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\copyDirectoryCopiesFilesAndDirectoriesWithAbsolutePaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\copyDirectoryCopiesFilesAndDirectoriesWithRelativePaths(), TYPO3\CMS\Lowlevel\Command\RteImagesCommand\copyMultipleReferencedRteImages(), TYPO3\CMS\Core\DataHandling\DataHandler\copyRecord_fixRTEmagicImages(), TYPO3\CMS\Core\DataHandling\DataHandler\copyRecord_procFilesRefs(), TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateGetDataAction(), TYPO3\CMS\IndexedSearch\Hook\CrawlerHook\crawler_execute_type2(), TYPO3\CMS\Core\Database\ReferenceIndex\createEntryDataForFileRelationsUsingRecord(), TYPO3\CMS\IndexedSearch\Indexer\createLocalPathFromAbsoluteURL(), TYPO3\CMS\IndexedSearch\Indexer\createLocalPathFromRelativeURL(), TYPO3\CMS\IndexedSearch\Indexer\createLocalPathUsingAbsRefPrefix(), TYPO3\CMS\IndexedSearch\Indexer\createLocalPathUsingDomainURL(), TYPO3\CMS\Core\Resource\StorageRepository\createLocalStorage(), TYPO3\CMS\Core\Tests\Functional\Resource\ResourceFactoryTest\createLocalStorages(), TYPO3\CMS\Core\Log\Writer\FileWriter\createLogFile(), TYPO3\CMS\Core\Resource\ResourceCompressor\createMergedFile(), TYPO3\CMS\Install\Controller\InstallerController\createSiteConfiguration(), TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\deleteFileMovesFileToRecyclerFolderIfAvailable(), TYPO3\CMS\Recycler\Task\CleanerTask\deleteFilesForTable(), TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\deleteFileUnlinksFileIfNoRecyclerFolderAvailable(), TYPO3\CMS\Core\Database\ReferenceIndex\destPathFromUploadFolder(), TYPO3\CMS\Core\Resource\Driver\LocalDriver\determineBaseUrl(), TYPO3\CMS\Core\Tests\Unit\Resource\Driver\LocalDriverTest\determineBaseUrlUrlEncodesUriParts(), TYPO3\CMS\Install\Service\CoreUpdateService\discoverCurrentCoreSymlink(), TYPO3\CMS\Rsaauth\BackendWarnings\displayWarningMessages_postProcess(), TYPO3\CMS\Frontend\Tests\Unit\Compatibility\LegacyDomainResolverTest\domainNameMatchesCurrentRequest(), TYPO3\CMS\Core\Core\ClassLoadingInformation\dumpClassLoadingInformation(), TYPO3\CMS\Extensionmanager\Utility\ListUtility\enrichExtensionsWithIconInformation(), TYPO3\CMS\Install\Controller\InstallerController\executeDatabaseConnectAction(), TYPO3\CMS\Impexp\Export\export_addFile(), TYPO3\CMS\Impexp\Export\export_addFilesFromRelations(), TYPO3\CMS\Impexp\Tests\Functional\Export\GroupFileAndFileReferenceItemInFlexFormTest\exportGroupFileAndFileReferenceItem(), TYPO3\CMS\Core\DataHandling\DataHandler\extFileFunctions(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ExtensionManagementUtilityTest\extPathAppendsScriptNameToPath(), TYPO3\CMS\IndexedSearch\Tests\Unit\IndexerTest\extractHyperLinksFindsCorrectPathForPathWithinTypo3Directory(), TYPO3\CMS\IndexedSearch\Tests\Unit\IndexerTest\extractHyperLinksFindsCorrectPathUsingAbsRefPrefix(), TYPO3\CMS\IndexedSearch\Tests\Unit\IndexerTest\extractHyperLinksFindsCorrectPathWithAbsolutePath(), TYPO3\CMS\IndexedSearch\Tests\Unit\IndexerTest\extractHyperLinksReturnsCorrectPathWithBaseUrl(), TYPO3\CMS\IndexedSearch\Indexer\extractLinks(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\FluidTemplateContentObjectTest\fallbacksForLayoutRootPathAreAppendedToLayoutRootPath(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\FluidTemplateContentObjectTest\fallbacksForLayoutRootPathAreSet(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\FluidTemplateContentObjectTest\fallbacksForPartialRootPathAreAppendedToPartialRootPath(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\FluidTemplateContentObjectTest\fallbacksForPartialRootPathAreSet(), TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest\filelinkCreatesCorrectUrlForFileWithUrlEncodedSpecialChars(), TYPO3\CMS\Lowlevel\Command\RteImagesCommand\findAllReferencedRteImagesWithOriginals(), TYPO3\CMS\Lowlevel\Command\RteImagesCommand\findAllRteFilesInDirectory(), TYPO3\CMS\Lowlevel\Command\LostFilesCommand\findLostFiles(), TYPO3\CMS\Lowlevel\Command\MissingFilesCommand\findMissingReferencedFiles(), TYPO3\CMS\Lowlevel\Command\MissingFilesCommand\findMissingSoftReferencedFiles(), TYPO3\CMS\Core\Database\SoftReferenceIndex\findRef_images(), TYPO3\CMS\Impexp\Export\fixFileIDsInRelations(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\fixPermissionsSetsPermissionsWithRelativeFileReference(), TYPO3\CMS\Impexp\Export\flatSoftRefs(), TYPO3\CMS\Install\Controller\EnvironmentController\folderStructureGetStatusAction(), TYPO3\CMS\Frontend\Tests\Unit\Typolink\AbstractTypolinkBuilderTest\forceAbsoluteUrlReturnsCorrectAbsoluteUrl(), TYPO3\CMS\Frontend\Tests\Unit\Typolink\AbstractTypolinkBuilderTest\forceAbsoluteUrlReturnsCorrectAbsoluteUrlWithSubfolder(), TYPO3\CMS\Frontend\Http\RequestHandler\generatePageContentWithHeader(), TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility\getAbsolutePath(), TYPO3\CMS\Core\Utility\PathUtility\getAbsoluteWebPath(), TYPO3\CMS\Extensionmanager\Utility\ListUtility\getAvailableExtensions(), TYPO3\CMS\Core\Core\Environment\getBackendPath(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\getCanonicalPathCorrectlyCleansPath(), TYPO3\CMS\Install\FolderStructure\DefaultFactory\getDefaultStructureDefinition(), TYPO3\CMS\Core\Core\Environment\getExtensionsPath(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\getFileAbsFileNameDateprovider(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\getFileAbsFileNameReturnsCorrectValues(), TYPO3\CMS\Core\Resource\ResourceCompressor\getFilenameFromMainDir(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInBackendContext(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInBackendContextDataProvider(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInBackendContextInSubfolderDataProvider(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInBackendContextWithSubFolder(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInFrontendContext(), TYPO3\CMS\Core\Tests\Unit\Resource\Driver\LocalDriverTest\getFileReturnsCorrectIdentifier(), TYPO3\CMS\Install\Report\InstallStatusReport\getFileSystemStatus(), TYPO3\CMS\Install\Service\EnableFileService\getFirstInstallFilePaths(), TYPO3\CMS\Core\Resource\ResourceFactory\getFolderObjectFromCombinedIdentifier(), TYPO3\CMS\Core\Core\Environment\getFrameworkBasePath(), TYPO3\CMS\Install\Controller\EnvironmentController\getImagesPath(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\getIndpEnvTypo3SitePathReturnsStringStartingWithSlash(), TYPO3\CMS\Install\Service\EnableFileService\getInstallToolEnableFilePath(), TYPO3\CMS\Install\Report\SecurityStatusReport\getInstallToolProtectionStatus(), TYPO3\CMS\Core\Core\Environment\getLabelsPath(), TYPO3\CMS\Core\Core\Environment\getLegacyConfigPath(), TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\getNestedProcessingFolderTest(), TYPO3\CMS\Core\Resource\ResourceStorage\getPublicUrl(), TYPO3\CMS\Install\Service\CoreUpdateService\getRelativePath(), TYPO3\CMS\Install\FolderStructure\AbstractNode\getRelativePathBelowSiteRoot(), 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\Core\Tests\Unit\Resource\Driver\LocalDriverTest\getSpecificFileInformationReturnsRequestedFileInformation(), TYPO3\CMS\Form\Slot\ResourcePublicationSlot\getStreamUrl(), TYPO3\CMS\Backend\Backend\Avatar\Image\getUrl(), TYPO3\CMS\Frontend\Imaging\GifBuilder\gifBuild(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickConvert(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingTrueTypeAction(), TYPO3\CMS\Impexp\Tests\Functional\Import\GroupFileAndFileReferenceItemTest\importGroupFileAndFileReferenceItem(), TYPO3\CMS\Impexp\Tests\Functional\Import\GroupFileAndFileReferenceItemTest\importGroupFileAndFileReferenceItemButImagesNotIncluded(), TYPO3\CMS\Impexp\Tests\Functional\Import\GroupFileAndFileReferenceItemInFlexFormTest\importGroupFileAndFileReferenceItemInFlexForm(), TYPO3\CMS\Impexp\Tests\Functional\Import\GroupFileAndFileReferenceItemTest\importGroupFileAndFileReferenceItemWithRootLevelAndPagesAllowed(), TYPO3\CMS\Impexp\Tests\Functional\Import\GroupFileAndFileReferenceItemTest\importGroupFileAndFileReferenceItemWithRootLevelNotAllowed(), TYPO3\CMS\Impexp\Tests\Functional\Import\GroupFileAndFileReferenceItemTest\importGroupFileAndFileReferenceItemWithRootLevelOnlyAllowed(), TYPO3\CMS\Extensionmanager\Utility\InstallUtility\importInitialFiles(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentTest\importPagesAndRelatedTtContent(), TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImagesInFilledDatabaseTest\importPagesAndRelatedTtContentWithDifferentImageToExistingData(), 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\Extensionmanager\Utility\InstallUtility\importStaticSqlFile(), TYPO3\CMS\Extensionmanager\Utility\InstallUtility\importT3DFile(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\InstallUtilityTest\importT3DFileDoesNotImportFileIfAlreadyImported(), TYPO3\CMS\IndexedSearch\Indexer\indexRegularDocument(), TYPO3\CMS\Core\Compatibility\LoadedExtensionArrayElement\initializeBasicExtensionInformation(), TYPO3\CMS\Core\Utility\CommandUtility\initPaths(), TYPO3\CMS\Frontend\Page\PageGenerator\inline2TempFile(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\invalidFilePathForTypo3tempDirDataProvider(), TYPO3\CMS\Core\Tests\Unit\Locking\SimpleLockStrategyTest\invalidFileReferences(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\isAbsolutePathRespectsAllOperatingSystems(), TYPO3\CMS\IndexedSearch\Indexer\isAllowedLocalFile(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\isRelativePathResolvedCorrectlyDataProvider(), TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\isWithinFileMountBoundariesRespectsReadOnlyFileMounts(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\locationHeaderUrl(), TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject\makeGifs(), TYPO3\CMS\Frontend\ContentObject\Menu\ImageMenuContentObject\makeImageMap(), TYPO3\CMS\Core\Database\QueryGenerator\makeOptionList(), TYPO3\CMS\Install\Updates\BackendLayoutIconUpdateWizard\migrateField(), TYPO3\CMS\Install\Updates\FrontendUserImageUpdateWizard\migrateField(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\mkdirDeepCreatesDirectoryWithDoubleSlashes(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\mkdirDeepThrowsExceptionIfDeepDirectoryIsNotOfTypeString(), TYPO3\CMS\Frontend\Tests\Functional\ContentObject\GifBuilderTest\overlayImagesHasStableHash(), TYPO3\CMS\Core\Middleware\NormalizedParamsAttribute\process(), TYPO3\CMS\Core\Resource\Processing\LocalCropScaleMaskHelper\process(), TYPO3\CMS\Extensionmanager\Utility\InstallUtility\processDatabaseUpdates(), TYPO3\CMS\Extensionmanager\Tests\UnitDeprecated\Utility\InstallUtilityTest\processDatabaseUpdatesCallsImportFile(), TYPO3\CMS\Impexp\Import\processSoftReferences_saveFile(), TYPO3\CMS\Impexp\Import\processSoftReferences_saveFile_createRelFile(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\readPngGif(), TYPO3\CMS\Backend\Utility\BackendUtility\referenceCount(), TYPO3\CMS\Core\Core\ClassLoadingInformation\registerTransientClassLoadingInformationForPackage(), TYPO3\CMS\Install\Service\EnableFileService\removeFirstInstallFile(), TYPO3\CMS\Core\Resource\ResourceStorage\renameFile(), TYPO3\CMS\Extensionmanager\ViewHelpers\ReloadSqlDataViewHelper\render(), TYPO3\CMS\Frontend\Page\PageGenerator\renderContentWithHeader(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\FluidTemplateContentObjectTest\renderSetsLayoutRootPathInView(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\FluidTemplateContentObjectTest\renderSetsPartialRootPathInView(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\FluidTemplateContentObjectTest\renderSetsTemplateFileByTemplateInView(), TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\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\retrieveFileOrFolderObjectReturnsFileIfPathIsGiven(), TYPO3\CMS\Core\Resource\ResourceCompressor\returnFileReference(), TYPO3\CMS\Frontend\Resource\FilePathSanitizer\sanitize(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsEncodedValidPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsEncodedValidUrls(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsNotEncodedValidPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsNotEncodedValidUrls(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlDeniesPlainInvalidUrlsInBackendContext(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlDeniesPlainInvalidUrlsInFrontendContext(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlValidPathsDataProvider(), TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\searchFilesFindsFilesInFolder(), TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController\set_no_cache(), TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\setUpFakeSitePathAndHost(), TYPO3\CMS\Install\Service\Typo3tempFileService\statsFromTypo3temp(), TYPO3\CMS\Core\Utility\PathUtility\stripPathSitePrefix(), TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\tearDown(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorIntegrationTest\tearDown(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\tempnamReturnsAbsolutePathInsideDocumentRoot(), TYPO3\CMS\Lowlevel\Integrity\DatabaseIntegrityCheck\testFileRefs(), TYPO3\CMS\Core\Integrity\DatabaseIntegrityCheck\testFileRefs(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\validFilePathForTypo3tempDirDataProvider(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\validRelativePathDataProvider(), and TYPO3\CMS\Core\Resource\ResourceCompressor\writeFileAndCompressed().

◆ getVarPath()

static string 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.

Returns
‪string

Definition at line 165 of file Environment.php.

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

Referenced by TYPO3\CMS\Core\Locking\FileLockStrategy\__construct(), TYPO3\CMS\Core\Locking\SemaphoreLockStrategy\__construct(), TYPO3\CMS\Core\Locking\SimpleLockStrategy\__construct(), TYPO3\CMS\Rsaauth\Backend\CommandLineBackend\__construct(), TYPO3\CMS\Install\Service\CoreUpdateService\__construct(), TYPO3\CMS\Install\Service\SessionService\__construct(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\addDirectoryAddsDirectory(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\attachWithResourceAttachesResource(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\attachWithStringRepresentingResourceCreatesAndAttachesResource(), TYPO3\CMS\Core\Tests\Unit\Resource\Driver\LocalDriverTest\calculatedBasePathAbsoluteIsSane(), TYPO3\CMS\Install\Service\ClearCacheService\clearAll(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\closeClosesResource(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\closeDoesNothingAfterDetach(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\closeUnsetsResource(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorIntegrationTest\concatenateCssFilesWorksWithFileFromNonRootPath(), TYPO3\CMS\Core\Tests\Unit\Locking\FileLockStrategyTest\constructorCreatesLockDirectoryIfNotExisting(), TYPO3\CMS\Core\Tests\Unit\Locking\SimpleLockStrategyTest\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\Utility\FileHandlingUtilityTest\createFakeExtension(), TYPO3\CMS\Extensionmanager\Tests\UnitDeprecated\Utility\InstallUtilityTest\createFakeExtension(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\InstallUtilityTest\createFakeExtension(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ExtensionManagementUtilityTest\createMockPackageManagerWithMockPackage(), TYPO3\CMS\Core\Tests\Unit\Resource\Driver\LocalDriverTest\createRealTestdir(), TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility\createZipFileFromExtension(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\createZipFileFromExtensionGeneratesCorrectArchive(), TYPO3\CMS\Extensionmanager\Utility\UpdateScriptUtility\determineUpdateClassName(), TYPO3\CMS\Install\Service\SessionService\ensureSessionSavePathExists(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\eofReportsFalseWhenNotAtEndOfStream(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\eofReportsTrueWhenAtEndOfStream(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\eofReportsTrueWhenStreamIsDetached(), TYPO3\CMS\Install\Controller\InstallerController\executeDatabaseConnectAction(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\AbstractNodeTest\existsReturnsTrueIfIsLinkAndTargetIsDead(), TYPO3\CMS\IndexedSearch\Tests\Unit\IndexerTest\extractHyperLinksReturnsCorrectFileUsingT3Vars(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\fixPermissionsDoesNotSetPermissionsToNotAllowedPath(), TYPO3\CMS\Frontend\Tests\Unit\Typolink\AbstractTypolinkBuilderTest\forceAbsoluteUrlReturnsCorrectAbsoluteUrl(), TYPO3\CMS\Frontend\Tests\Unit\Typolink\AbstractTypolinkBuilderTest\forceAbsoluteUrlReturnsCorrectAbsoluteUrlWithSubfolder(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\getAllFilesAndFoldersInPathReturnsArrayWithMd5Keys(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\getCanonicalPathCorrectlyCleansPath(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\getContentsReturnsEmptyStringIfStreamIsNotReadable(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\getContentsShouldGetFullStreamContents(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\getContentsShouldReturnStreamContentsFromCurrentPointer(), TYPO3\CMS\Core\Tests\Unit\Configuration\ConfigurationManagerTest\getDefaultConfigurationExecutesDefinedDefaultConfigurationFile(), TYPO3\CMS\Core\Log\Writer\FileWriter\getDefaultLogFileName(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInBackendContext(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInBackendContextWithSubFolder(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInFrontendContext(), TYPO3\CMS\Install\Report\InstallStatusReport\getFileSystemStatus(), TYPO3\CMS\Install\Tests\Unit\Service\EnableFileServiceTest\getFirstInstallFilePaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\getIndpEnvTypo3SitePathReturnsStringStartingWithSlash(), TYPO3\CMS\Core\Core\Environment\getLabelsPath(), TYPO3\CMS\Core\Tests\Unit\Configuration\ConfigurationManagerTest\getLocalConfigurationExecutesDefinedConfigurationFile(), TYPO3\CMS\Extensionmanager\Utility\Repository\Helper\getLocalExtListFile(), TYPO3\CMS\Extensionmanager\Utility\Repository\Helper\getLocalMirrorListFile(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\getMetadataReturnsAllMetadataWhenNoKeyPresent(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\getMetadataReturnsDataForSpecifiedKey(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\getMetadataReturnsNullIfNoDataExistsForKey(), TYPO3\CMS\Core\Tests\Unit\Localization\LocalizationFactoryTest\getParsedDataHandlesLocallangXMLOverride(), TYPO3\CMS\Core\Tests\Unit\Mail\TransportFactoryTest\getReturnsSwiftMailTransport(), TYPO3\CMS\Core\Tests\Unit\Mail\TransportFactoryTest\getReturnsSwiftSpoolTransportUsingCustomSpool(), TYPO3\CMS\Core\Tests\Unit\Mail\TransportFactoryTest\getReturnsSwiftSpoolTransportUsingSwiftMemorySpool(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\RootNodeTest\getStatusCallsGetChildrenStatusForStatus(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\LinkNodeTest\getStatusReturnsArray(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\getStatusReturnsArray(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\LinkNodeTest\getStatusReturnsArrayWithErrorStatusIfLinkNotExists(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\LinkNodeTest\getStatusReturnsArrayWithInformationStatusIfRunningOnWindows(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\RootNodeTest\getStatusReturnsArrayWithOkStatusAndCallsOwnStatusMethods(), TYPO3\CMS\Core\Resource\OnlineMedia\Helpers\AbstractOnlineMediaHelper\getTempFolderPath(), 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\Locking\SimpleLockStrategyTest\invalidFileReferences(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\isAbsolutePathRespectsAllOperatingSystems(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isDirectoryReturnsFalseIfNameIsALinkToADirectory(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\LinkNodeTest\isFileReturnsFalseIfNameIsAFile(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\FileNodeTest\isFileReturnsFalseIfNameIsALinkFile(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\LinkNodeTest\isLinkReturnsTrueIfNameIsLink(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\isReadableReturnsFalseIfStreamIsNotReadable(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\isReadableReturnsFalseWhenStreamIsDetached(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\isSeekableReturnsFalseForDetachedStreams(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\isSeekableReturnsTrueForReadableStreams(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\LinkNodeTest\isTargetCorrectReturnsFalseIfActualTargetIsNotIdenticalToSpecifiedTarget(), TYPO3\CMS\Install\Tests\Unit\FolderStructure\LinkNodeTest\isTargetCorrectReturnsTrueIfActualTargetIsIdenticalToSpecifiedTarget(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\isWritableReturnsFalseWhenStreamIsDetached(), TYPO3\CMS\Install\Service\LanguagePackService\languagePackDownload(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\locationHeaderUrl(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\makeAndClearExtensionDirAddsDir(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\makeAndClearExtensionDirRemovesExtensionDirIfAlreadyExists(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\mkdirDeepDoesNotChangePermissionsOfExistingSubDirectories(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\mkdirDeepFixesPermissionsOfCreatedDirectory(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\mkdirDeepFixesPermissionsOnNewParentDirectory(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\mkdirDeepSetsGroupOwnershipOfCreatedDirectory(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\mkdirDeepSetsGroupOwnershipOfCreatedParentDirectory(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\mkdirDeepSetsGroupOwnershipOnNewSubDirectory(), TYPO3\CMS\Extensionmanager\Tests\UnitDeprecated\Utility\InstallUtilityTest\processDatabaseUpdatesCallsUpdateDbWithExtTablesSql(), TYPO3\CMS\Core\Resource\OnlineMedia\Processing\PreviewProcessing\processFile(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\randomName(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\readRaisesExceptionWhenStreamIsDetached(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\readReturnsEmptyStringWhenAtEndOfFile(), TYPO3\CMS\Core\Locking\SimpleLockStrategy\release(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\removeDirectoryDoesNotRemoveContentOfSymlinkedTargetDirectory(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\removeDirectoryRemovesDirectory(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\removeDirectoryRemovesSymlink(), TYPO3\CMS\Install\Tests\Unit\Service\EnableFileServiceTest\removeFirstInstallFile(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\rewindResetsToStartOfStream(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\rmdirDoesNotRemoveDirectoryWithFilesAndReturnsFalseIfRecursiveDeletionIsOff(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\rmdirRemovesDeadLinkToDirectory(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\rmdirRemovesDeadLinkToFile(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\rmdirRemovesDirectoriesRecursiveAndReturnsTrue(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\rmdirRemovesDirectory(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\rmdirRemovesDirectoryWithTrailingSlash(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\rmdirRemovesFile(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\rmdirRemovesLinkToDirectory(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\rmdirReturnFalseIfNoFileWasRemoved(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\rmdirReturnTrueIfFileWasRemoved(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsEncodedValidPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsEncodedValidUrls(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsNotEncodedValidPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsNotEncodedValidUrls(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlDeniesPlainInvalidUrlsInBackendContext(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlDeniesPlainInvalidUrlsInFrontendContext(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\seekAdvancesToGivenOffsetOfStream(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\seekRaisesExceptionWhenStreamIsDetached(), TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend\setCache(), TYPO3\CMS\Core\Tests\Unit\Configuration\SiteConfigurationTest\setUp(), TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\setUpFakeSitePathAndHost(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\splitFileRefReturnsFileTypeNotForFolders(), TYPO3\CMS\Extensionmanager\Tests\UnitDeprecated\Utility\InstallUtilityTest\tearDown(), TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\InstallUtilityTest\tearDown(), TYPO3\CMS\Core\Tests\Unit\Configuration\SiteConfigurationTest\tearDown(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\tellRaisesExceptionIfResourceIsDetached(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\tellReportsCurrentPositionInResource(), TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\toStringSerializationReturnsEmptyStringWhenStreamIsNotReadable(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\unlink_tempfileRemovesHiddenFile(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\unlink_tempfileRemovesValidFileInTypo3temp(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\unlink_tempfileReturnsNullIfFileDoesNotExist(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\unlink_tempfileReturnsTrueIfFileWasRemoved(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap(), TYPO3\CMS\Install\Service\SessionService\write(), TYPO3\CMS\Core\Tests\Unit\Configuration\ConfigurationManagerTest\writeLocalConfigurationWritesSortedContentToConfigurationFile(), and TYPO3\CMS\Core\Tests\Unit\Http\StreamTest\writeRaisesExceptionWhenStreamIsDetached().

◆ 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!

Parameters
ApplicationContext$context
bool$cli
bool$composerMode
string$projectPath
string$publicPath
string$varPath
string$configPath
string$currentScript
string$os

Definition at line 77 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, and TYPO3\CMS\Core\Core\Environment\$varPath.

Referenced by TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorIntegrationTest\concatenateCssFilesWorksWithFileFromNonRootPath(), TYPO3\CMS\Frontend\Tests\Unit\Typolink\AbstractTypolinkBuilderTest\forceAbsoluteUrlReturnsCorrectAbsoluteUrl(), TYPO3\CMS\Frontend\Tests\Unit\Typolink\AbstractTypolinkBuilderTest\forceAbsoluteUrlReturnsCorrectAbsoluteUrlWithSubfolder(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\getCanonicalPathCorrectlyCleansPath(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInBackendContext(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInBackendContextWithSubFolder(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInFrontendContext(), TYPO3\CMS\Install\Tests\Unit\Service\EnableFileServiceTest\getFirstInstallFilePaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\getIndpEnvTypo3SitePathReturnsStringStartingWithSlash(), TYPO3\CMS\Core\Core\SystemEnvironmentBuilder\initializeEnvironment(), TYPO3\CMS\Core\Tests\Unit\Utility\PathUtilityTest\isAbsolutePathRespectsAllOperatingSystems(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\locationHeaderUrl(), TYPO3\CMS\Install\Tests\Unit\Service\EnableFileServiceTest\removeFirstInstallFile(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsEncodedValidPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsEncodedValidUrls(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsNotEncodedValidPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsNotEncodedValidUrls(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlDeniesPlainInvalidUrlsInBackendContext(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlDeniesPlainInvalidUrlsInFrontendContext(), TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\SiteDatabaseEditRowTest\setUp(), and TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\setUpFakeSitePathAndHost().

◆ isCli()

◆ isComposerMode()

static bool 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.

Returns
‪bool

Definition at line 117 of file Environment.php.

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

Referenced by TYPO3\CMS\Extensionmanager\Controller\ListController\addComposerModeNotification(), TYPO3\CMS\Core\Core\Bootstrap\baseSetup(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\checkScreenAction(), TYPO3\CMS\Install\Controller\UpgradeController\coreUpdateGetDataAction(), TYPO3\CMS\Install\Controller\MaintenanceController\dumpAutoloadAction(), TYPO3\CMS\Extensionmanager\Command\ExtensionCommandController\dumpClassLoadingInformationCommand(), TYPO3\CMS\Extensionmanager\Controller\UploadExtensionFileController\extractAction(), TYPO3\CMS\Extensionmanager\Utility\Connection\TerUtility\fetchExtension(), TYPO3\CMS\Extensionmanager\Controller\UploadExtensionFileController\formAction(), TYPO3\CMS\Extensionmanager\Controller\AbstractModuleController\generateMenu(), TYPO3\CMS\Backend\Backend\ToolbarItems\SystemInformationToolbarItem\getComposerMode(), TYPO3\CMS\Install\Report\InstallStatusReport\getFileSystemStatus(), TYPO3\CMS\Install\Tests\Unit\Service\EnableFileServiceTest\getFirstInstallFilePaths(), TYPO3\CMS\Extensionmanager\Controller\ListController\indexAction(), TYPO3\CMS\Core\Core\Bootstrap\init(), TYPO3\CMS\Install\Controller\AbstractController\initializeStandaloneView(), TYPO3\CMS\Install\Updates\AbstractDownloadExtensionUpdate\installExtension(), TYPO3\CMS\Install\Service\CoreUpdateService\isCoreUpdateEnabled(), TYPO3\CMS\Core\Command\DumpAutoloadCommand\isEnabled(), TYPO3\CMS\Extensionmanager\Controller\ListController\registerDocheaderButtons(), TYPO3\CMS\Extensionmanager\Controller\ActionController\removeExtensionAction(), TYPO3\CMS\Install\Tests\Unit\Service\EnableFileServiceTest\removeFirstInstallFile(), TYPO3\CMS\Install\Controller\InstallerController\showDefaultConfigurationAction(), and TYPO3\CMS\Core\Core\Bootstrap\usesComposerClassLoading().

◆ isRunningOnCgiServer()

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

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

Returns
‪bool

Definition at line 286 of file Environment.php.

◆ isUnix()

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

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

Returns
‪bool

Definition at line 276 of file Environment.php.

◆ isWindows()

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

Whether this TYPO3 installation runs on windows

Returns
‪bool

Definition at line 266 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\Core\Tests\Unit\Utility\GeneralUtilityTest\checkGroups(), TYPO3\CMS\Install\SystemEnvironment\SetupCheck\checkLocaleWithUTF8filesystem(), TYPO3\CMS\Install\Service\CoreUpdateService\checkPreConditions(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\checkScreenAction(), TYPO3\CMS\Install\SystemEnvironment\SetupCheck\checkSystemLocale(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorIntegrationTest\concatenateCssFilesWorksWithFileFromNonRootPath(), TYPO3\CMS\Core\Tests\Unit\Resource\Driver\LocalDriverTest\createFileFixesPermissionsOnCreatedFile(), TYPO3\CMS\Rsaauth\Backend\CommandLineBackend\createNewKeyPair(), TYPO3\CMS\Install\Configuration\Image\GraphicsMagickPreset\findGraphicsMagickInPaths(), TYPO3\CMS\Install\Configuration\Image\ImageMagick6Preset\findImageMagick6InPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\fixPermissionsCorrectlySetsPermissionsRecursive(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\fixPermissionsDoesNotSetPermissionsToNotAllowedPath(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\fixPermissionsSetsDefaultPermissionsToDirectory(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\fixPermissionsSetsDefaultPermissionsToFile(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\fixPermissionsSetsGroup(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\fixPermissionsSetsPermissionsToDirectory(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\fixPermissionsSetsPermissionsToDirectoryWithTrailingSlash(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\fixPermissionsSetsPermissionsToFile(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\fixPermissionsSetsPermissionsToHiddenDirectory(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\fixPermissionsSetsPermissionsToHiddenFile(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\fixPermissionsSetsPermissionsWithRelativeFileReference(), TYPO3\CMS\Frontend\Tests\Unit\Typolink\AbstractTypolinkBuilderTest\forceAbsoluteUrlReturnsCorrectAbsoluteUrl(), TYPO3\CMS\Frontend\Tests\Unit\Typolink\AbstractTypolinkBuilderTest\forceAbsoluteUrlReturnsCorrectAbsoluteUrlWithSubfolder(), TYPO3\CMS\Core\Utility\PathUtility\getCanonicalPath(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInBackendContext(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInBackendContextWithSubFolder(), TYPO3\CMS\Core\Tests\Unit\Resource\ResourceCompressorTest\getFilenamesFromMainDirInFrontendContext(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\getIndpEnvTypo3SitePathReturnsStringStartingWithSlash(), TYPO3\CMS\Install\FolderStructure\DefaultPermissionsCheck\getMaskStatus(), TYPO3\CMS\Core\Utility\CommandUtility\getPathsInternal(), TYPO3\CMS\Reports\Report\Status\ConfigurationStatus\getStatus(), TYPO3\CMS\Core\Utility\CommandUtility\imageMagickCommand(), TYPO3\CMS\IndexedSearch\FileContentParser\initParser(), TYPO3\CMS\Core\Utility\PathUtility\isAbsolutePath(), TYPO3\CMS\Install\FolderStructure\AbstractNode\isWindowsOs(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\locationHeaderUrl(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\mkdirDeepDoesNotChangePermissionsOfExistingSubDirectories(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\mkdirDeepFixesPermissionsOfCreatedDirectory(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\mkdirDeepFixesPermissionsOnNewParentDirectory(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\mkdirSetsPermissionsOfCreatedDirectory(), TYPO3\CMS\Core\Tests\Unit\Resource\Driver\LocalDriverTest\permissionsAreCorrectlyRetrievedForForbiddenFile(), TYPO3\CMS\Core\Tests\Unit\Resource\Driver\LocalDriverTest\permissionsAreCorrectlyRetrievedForForbiddenFolder(), TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility\removeDirectory(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsEncodedValidPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsEncodedValidUrls(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsNotEncodedValidPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlAcceptsNotEncodedValidUrls(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlDeniesPlainInvalidUrlsInBackendContext(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\sanitizeLocalUrlDeniesPlainInvalidUrlsInFrontendContext(), TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend\setCacheDirectory(), TYPO3\CMS\Felogin\Tests\Unit\Controller\FrontendLoginControllerTest\setUpFakeSitePathAndHost(), TYPO3\CMS\Rsaauth\Tests\Unit\Backend\CommandLineBackendTest\skipIfWindows(), and TYPO3\CMS\Install\Controller\EnvironmentController\systemInformationGetDataAction().

Member Data Documentation

◆ $cli

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

◆ $composerMode

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

◆ $configPath

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

◆ $context

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

◆ $currentScript

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

◆ $os

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

Definition at line 57 of file Environment.php.

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

◆ $projectPath

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

◆ $publicPath

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 43 of file Environment.php.

◆ $varPath

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