PHP Class Piwik\Filechecks

Afficher le fichier Open project: piwik/piwik Class Usage Examples

Méthodes publiques

Méthode Description
canAutoUpdate ( ) : boolean Check if this installation can be auto-updated.
checkDirectoriesWritable ( array $directoriesToCheck ) : array Checks if directories are writable and create them if they do not exist.
dieIfDirectoriesNotWritable ( array $directoriesToCheck = null ) Checks that the directories Piwik needs write access are actually writable Displays a nice error page if permissions are missing on some directories
getAutoUpdateMakeWritableMessage ( ) : string Returns the help message when the auto update can't run because of missing permissions
getCommandToChangeOwnerOfPiwikFiles ( ) : string
getErrorMessageMissingPermissions ( string $path ) : string Returns friendly error message explaining how to fix permissions
getFileIntegrityInformation ( ) : array(bool, Get file integrity information (in PIWIK_INCLUDE_PATH).
getOwnerOfPiwikFiles ( )
getUser ( )
getUserAndGroup ( )

Private Methods

Méthode Description
getMakeWritableCommand ( string $realpath ) : string Returns the help text displayed to suggest which command to run to give writable access to a file or directory
isModifiedPathValid ( $path )

Method Details

canAutoUpdate() public static méthode

For performance, we look for clues rather than an exhaustive test.
public static canAutoUpdate ( ) : boolean
Résultat boolean

checkDirectoriesWritable() public static méthode

Checks if directories are writable and create them if they do not exist.
public static checkDirectoriesWritable ( array $directoriesToCheck ) : array
$directoriesToCheck array array of directories to check - if not given default Piwik directories that needs write permission are checked
Résultat array directory name => true|false (is writable)

dieIfDirectoriesNotWritable() public static méthode

Checks that the directories Piwik needs write access are actually writable Displays a nice error page if permissions are missing on some directories
public static dieIfDirectoriesNotWritable ( array $directoriesToCheck = null )
$directoriesToCheck array Array of directory names to check

getAutoUpdateMakeWritableMessage() public static méthode

Returns the help message when the auto update can't run because of missing permissions
public static getAutoUpdateMakeWritableMessage ( ) : string
Résultat string

getCommandToChangeOwnerOfPiwikFiles() public static méthode

public static getCommandToChangeOwnerOfPiwikFiles ( ) : string
Résultat string

getErrorMessageMissingPermissions() public static méthode

Returns friendly error message explaining how to fix permissions
public static getErrorMessageMissingPermissions ( string $path ) : string
$path string to the directory missing permissions
Résultat string Error message

getFileIntegrityInformation() public static méthode

Get file integrity information (in PIWIK_INCLUDE_PATH).
public static getFileIntegrityInformation ( ) : array(bool,
Résultat array(bool,

getOwnerOfPiwikFiles() public static méthode

public static getOwnerOfPiwikFiles ( )

getUser() public static méthode

public static getUser ( )

getUserAndGroup() public static méthode

public static getUserAndGroup ( )