PHP Class Piwik\Filechecks

ファイルを表示 Open project: piwik/piwik Class Usage Examples

Public Methods

Method 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

Method 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 method

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

checkDirectoriesWritable() public static method

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
return array directory name => true|false (is writable)

dieIfDirectoriesNotWritable() public static method

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 method

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

getCommandToChangeOwnerOfPiwikFiles() public static method

getErrorMessageMissingPermissions() public static method

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

getFileIntegrityInformation() public static method

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

getOwnerOfPiwikFiles() public static method

public static getOwnerOfPiwikFiles ( )

getUser() public static method

public static getUser ( )

getUserAndGroup() public static method

public static getUserAndGroup ( )