Methods
AutoUpdater constructor.
__construct(\AutoUpdaterSettings $settings, \AutoUpdaterBackupHelper $backupHelper, \AutoUpdaterUpdatesHelper $updatesHelper, \AutoUpdaterDownloadHelper $downloadHelper, \LogControl $logControl)
Activates the ftp manager. After activation all filesystem actions will be primary done with (s)ftp.
activateFtpManager(\AutoUpdaterFtpManager $ftpManager)
Checks if there are uninstalled updates.
areUninstalledUpdatesAvailable() : boolean
Response
boolean
Returns true, if there are uninstalled updates, otherwise false.
Calls home and sends some feedback about the update processing
callHome(string $message, string $updateId = '', \Exception|null $exception = null)
Arguments
$exception
\Exception|null
Checks the writing permissions for a given list of files.
checkFilesPermissionsForBackup( $backupId) : boolean
Arguments
Response
boolean
Checks the writing permissions for a given list of files.
checkFilesPermissionsWithFileList(array $fileList) : boolean
Arguments
Response
boolean
Creates a new debug log.
createDebugLog(string $message, string|array $additionalData = '')
Arguments
$additionalData
string|array
Deletes a backup by a given id.
deleteBackup(string $backupId)
|
|
Throws |
- \AutoUpdaterBackupRestoreFailedException
|
Arguments
Returns an update instance by a given update id.
fetchUpdateById(string $updateId) : \AutoUpdaterUpdate
Returns a list of all available backups.
getAvailableBackups() : array
Returns a list of all available updates.
getAvailableUpdates() : array
|
|
Throws |
- \AutoUpdaterException
|
Response
array
Returns a list of files, that are wrong permitted.
getWrongPermittedFiles() : array
Installs a single given update.
processUpdate(string $selectedUpdate) : array
Throws |
- \AutoUpdaterBackupCreationFailedException
- \AutoUpdaterBackupRestoreFailedException
- \AutoUpdaterUpdateDownloadFailedException
- \AutoUpdaterMissingPermissionException
- \AutoUpdaterException
- \Exception
|
Arguments
Response
array
Restores a backup by a given id.
restoreBackup(string $backupId, integer|null $lastRestoredIndex = null) : array
Throws |
- \AutoUpdaterBackupRestoreFailedException
|
Arguments
$lastRestoredIndex
integer|null
Response
array
Properties
settings
settings : \AutoUpdaterSettings
backupHelper
backupHelper : \AutoUpdaterBackupHelper
updatesHelper
updatesHelper : \AutoUpdaterUpdatesHelper
downloadHelper
downloadHelper : \AutoUpdaterDownloadHelper
wrongPermittedFiles
wrongPermittedFiles : array
logControl
logControl : \LogControl