PHP Class Piwik\Plugins\Installation\ServerFilesGenerator

Mostrar archivo Open project: piwik/piwik Class Usage Examples

Public Methods

Method Description
createFilesForSecurity ( )
createHtAccessFiles ( ) Generate Apache .htaccess files to restrict access
createWebRootFiles ( ) Generate default robots.txt, favicon.ico, etc to suppress 404 (Not Found) errors in the web server logs, if Piwik is installed in the web root (or top level of subdomain).
deleteHtAccessFiles ( ) Deletes all existing .htaccess files and web.config files that Piwik may have created,
deleteWebConfigFiles ( )

Protected Methods

Method Description
createHtAccess ( string $path, boolean $overwrite = true, string $content ) Create .htaccess file in specified directory
createWebConfigFiles ( ) Generate IIS web.config files to restrict access
getAllowHtaccessContent ( ) : string
getDenyAllHtaccessContent ( ) : string
getDenyHtaccessContent ( ) : string

Method Details

createFilesForSecurity() public static method

public static createFilesForSecurity ( )

createHtAccess() protected static method

Apache-specific; for IIS @see web.config .htaccess files are created on all webservers even Nginx, as sometimes Nginx knows how to handle .htaccess files
protected static createHtAccess ( string $path, boolean $overwrite = true, string $content )
$path string without trailing slash
$overwrite boolean whether to overwrite an existing file or not
$content string

createHtAccessFiles() public static method

.htaccess files are created on all webservers even Nginx, as sometimes Nginx knows how to handle .htaccess files
public static createHtAccessFiles ( )

createWebConfigFiles() protected static method

Note: for IIS 7 and above
protected static createWebConfigFiles ( )

createWebRootFiles() public static method

Generate default robots.txt, favicon.ico, etc to suppress 404 (Not Found) errors in the web server logs, if Piwik is installed in the web root (or top level of subdomain).
public static createWebRootFiles ( )

deleteHtAccessFiles() public static method

Deletes all existing .htaccess files and web.config files that Piwik may have created,
public static deleteHtAccessFiles ( )

deleteWebConfigFiles() public static method

public static deleteWebConfigFiles ( )

getAllowHtaccessContent() protected static method

protected static getAllowHtaccessContent ( ) : string
return string

getDenyAllHtaccessContent() protected static method

protected static getDenyAllHtaccessContent ( ) : string
return string

getDenyHtaccessContent() protected static method

protected static getDenyHtaccessContent ( ) : string
return string