‪TYPO3CMS  ‪main
TYPO3\CMS\Install\Service\WebServerConfigurationFileService Class Reference

Public Member Functions

 __construct ()
 
 addWebServerSpecificBackendRoutingRewriteRules ()
 

Protected Member Functions

 addApacheBackendRoutingRewriteRules ()
 
 addMicrosoftIisBackendRoutingRewriteRules ()
 
string getConfigurationFileContent (string $filename)
 
 updateNecessary (string $configurationFileContent)
 
 isApache ()
 
 isMicrosoftIis ()
 
 getWebServer ()
 

Protected Attributes

string $webServer
 
string $publicPath
 

Detailed Description

Handles webserver specific configuration files

This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.

Definition at line 27 of file WebServerConfigurationFileService.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ addApacheBackendRoutingRewriteRules()

◆ addMicrosoftIisBackendRoutingRewriteRules()

◆ addWebServerSpecificBackendRoutingRewriteRules()

◆ getConfigurationFileContent()

string TYPO3\CMS\Install\Service\WebServerConfigurationFileService::getConfigurationFileContent ( string  $filename)
protected

Returns the webserver configuration if it exists, is readable and is writeable

Parameters
string$filename‪The webserver configuration file name
Returns
‪string The webserver configuration or an empty string

Definition at line 134 of file WebServerConfigurationFileService.php.

Referenced by TYPO3\CMS\Install\Service\WebServerConfigurationFileService\addApacheBackendRoutingRewriteRules(), and TYPO3\CMS\Install\Service\WebServerConfigurationFileService\addMicrosoftIisBackendRoutingRewriteRules().

◆ getWebServer()

TYPO3\CMS\Install\Service\WebServerConfigurationFileService::getWebServer ( )
protected

◆ isApache()

◆ isMicrosoftIis()

◆ updateNecessary()

TYPO3\CMS\Install\Service\WebServerConfigurationFileService::updateNecessary ( string  $configurationFileContent)
protected

Checks if the webserver configuration needs to be updated.

This currently checks if the "known directory" rule still contains the typo3 directory and the frontend rewrite rule exists. Later is needed since the backend rewrite rule must be placed before.

Parameters
string$configurationFileContent

Definition at line 153 of file WebServerConfigurationFileService.php.

References TYPO3\CMS\Install\Service\WebServerConfigurationFileService\isApache(), and TYPO3\CMS\Install\Service\WebServerConfigurationFileService\isMicrosoftIis().

Referenced by TYPO3\CMS\Install\Service\WebServerConfigurationFileService\addApacheBackendRoutingRewriteRules(), and TYPO3\CMS\Install\Service\WebServerConfigurationFileService\addMicrosoftIisBackendRoutingRewriteRules().

Member Data Documentation

◆ $publicPath

string TYPO3\CMS\Install\Service\WebServerConfigurationFileService::$publicPath
protected

Definition at line 30 of file WebServerConfigurationFileService.php.

◆ $webServer

string TYPO3\CMS\Install\Service\WebServerConfigurationFileService::$webServer
protected

Definition at line 29 of file WebServerConfigurationFileService.php.