AutoUpdater
in package
Class AutoUpdater
Table of Contents
- $backupHelper : AutoUpdaterBackupHelper
- $downloadHelper : AutoUpdaterDownloadHelper
- $logControl : LogControl
- $settings : AutoUpdaterSettings
- $updatesHelper : AutoUpdaterUpdatesHelper
- $wrongPermittedFiles : array<string|int, mixed>
- __construct() : mixed
- AutoUpdater constructor.
- activateFtpManager() : mixed
- Activates the ftp manager. After activation all filesystem actions will be primary done with (s)ftp.
- areUninstalledUpdatesAvailable() : bool
- Checks if there are uninstalled updates.
- callHome() : mixed
- Calls home and sends some feedback about the update processing
- checkFilesPermissionsForBackup() : bool
- Checks the writing permissions for a given list of files.
- checkFilesPermissionsWithFileList() : bool
- Checks the writing permissions for a given list of files.
- deleteBackup() : mixed
- Deletes a backup by a given id.
- fetchUpdateById() : AutoUpdaterUpdate
- Returns an update instance by a given update id.
- getAvailableBackups() : array<string|int, mixed>
- Returns a list of all available backups.
- getAvailableUpdates() : array<string|int, mixed>
- Returns a list of all available updates.
- getWrongPermittedFiles() : array<string|int, mixed>
- Returns a list of files, that are wrong permitted.
- processUpdate() : array<string|int, mixed>
- Installs a single given update.
- restoreBackup() : array<string|int, mixed>
- Restores a backup by a given id.
- createDebugLog() : mixed
- Creates a new debug log.
Properties
$backupHelper
private
AutoUpdaterBackupHelper
$backupHelper
$downloadHelper
private
AutoUpdaterDownloadHelper
$downloadHelper
$logControl
private
LogControl
$logControl
$settings
private
AutoUpdaterSettings
$settings
$updatesHelper
private
AutoUpdaterUpdatesHelper
$updatesHelper
$wrongPermittedFiles
private
array<string|int, mixed>
$wrongPermittedFiles
Methods
__construct()
AutoUpdater constructor.
public
__construct(AutoUpdaterSettings $settings, AutoUpdaterBackupHelper $backupHelper, AutoUpdaterUpdatesHelper $updatesHelper, AutoUpdaterDownloadHelper $downloadHelper, LogControl $logControl) : mixed
Parameters
- $settings : AutoUpdaterSettings
- $backupHelper : AutoUpdaterBackupHelper
- $updatesHelper : AutoUpdaterUpdatesHelper
- $downloadHelper : AutoUpdaterDownloadHelper
- $logControl : LogControl
Return values
mixed —activateFtpManager()
Activates the ftp manager. After activation all filesystem actions will be primary done with (s)ftp.
public
activateFtpManager(AutoUpdaterFtpManager $ftpManager) : mixed
Parameters
- $ftpManager : AutoUpdaterFtpManager
Return values
mixed —areUninstalledUpdatesAvailable()
Checks if there are uninstalled updates.
public
areUninstalledUpdatesAvailable() : bool
Return values
bool —Returns true, if there are uninstalled updates, otherwise false.
callHome()
Calls home and sends some feedback about the update processing
public
callHome(string $message[, string $updateId = '' ][, Exception|null $exception = null ]) : mixed
Parameters
- $message : string
- $updateId : string = ''
- $exception : Exception|null = null
Return values
mixed —checkFilesPermissionsForBackup()
Checks the writing permissions for a given list of files.
public
checkFilesPermissionsForBackup(mixed $backupId) : bool
Parameters
- $backupId : mixed
Return values
bool —checkFilesPermissionsWithFileList()
Checks the writing permissions for a given list of files.
public
checkFilesPermissionsWithFileList(array<string|int, mixed> $fileList) : bool
Parameters
- $fileList : array<string|int, mixed>
Return values
bool —deleteBackup()
Deletes a backup by a given id.
public
deleteBackup(string $backupId) : mixed
Parameters
- $backupId : string
Tags
Return values
mixed —fetchUpdateById()
Returns an update instance by a given update id.
public
fetchUpdateById(string $updateId) : AutoUpdaterUpdate
Parameters
- $updateId : string
Tags
Return values
AutoUpdaterUpdate —getAvailableBackups()
Returns a list of all available backups.
public
getAvailableBackups() : array<string|int, mixed>
Return values
array<string|int, mixed> —getAvailableUpdates()
Returns a list of all available updates.
public
getAvailableUpdates() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getWrongPermittedFiles()
Returns a list of files, that are wrong permitted.
public
getWrongPermittedFiles() : array<string|int, mixed>
Return values
array<string|int, mixed> —processUpdate()
Installs a single given update.
public
processUpdate(AutoUpdaterUpdate $update) : array<string|int, mixed>
Parameters
- $update : AutoUpdaterUpdate
Tags
Return values
array<string|int, mixed> —restoreBackup()
Restores a backup by a given id.
public
restoreBackup(string $backupId[, int|null $lastRestoredIndex = null ]) : array<string|int, mixed>
Parameters
- $backupId : string
- $lastRestoredIndex : int|null = null
Tags
Return values
array<string|int, mixed> —createDebugLog()
Creates a new debug log.
protected
createDebugLog(string $message[, string|array<string|int, mixed> $additionalData = '' ]) : mixed
Parameters
- $message : string
- $additionalData : string|array<string|int, mixed> = ''