PHP Class Piwik\Plugins\CoreUpdater\Updater

Show file Open project: piwik/piwik Class Usage Examples

Public Methods

Method Description
__construct ( Piwik\Translation\Translator $translator, ReleaseChannels $releaseChannels, $tmpPath )
getArchiveUrl ( string $version, boolean $https = true ) : string
getLatestVersion ( ) : false | string Returns the latest available version number. Does not perform a check whether a later version is available.
isNewVersionAvailable ( ) : boolean
isUpdatingOverHttps ( ) : boolean
updatePiwik ( boolean $https = true ) : string[] Update Piwik codebase by downloading and installing the latest version.

Private Methods

Method Description
decompressArchive ( $archiveFile )
disableIncompatiblePlugins ( $version )
downloadArchive ( $version, $url )
getIncompatiblePlugins ( $piwikVersion )
installNewFiles ( $extractedArchiveDirectory )
verifyDecompressedArchive ( $extractedArchiveDirectory )

Method Details

__construct() public method

public __construct ( Piwik\Translation\Translator $translator, ReleaseChannels $releaseChannels, $tmpPath )
$translator Piwik\Translation\Translator
$releaseChannels Piwik\Plugin\ReleaseChannels

getArchiveUrl() public method

public getArchiveUrl ( string $version, boolean $https = true ) : string
$version string
$https boolean Whether to use HTTPS if supported of not. If false, will use HTTP.
return string

getLatestVersion() public method

Returns the latest available version number. Does not perform a check whether a later version is available.
public getLatestVersion ( ) : false | string
return false | string

isNewVersionAvailable() public method

public isNewVersionAvailable ( ) : boolean
return boolean

isUpdatingOverHttps() public method

public isUpdatingOverHttps ( ) : boolean
return boolean

updatePiwik() public method

Update Piwik codebase by downloading and installing the latest version.
public updatePiwik ( boolean $https = true ) : string[]
$https boolean Whether to use HTTPS if supported of not. If false, will use HTTP.
return string[] Return an array of messages for the user.