Methods
AutoUpdaterUpdatesChecker constructor.
__construct(\AutoUpdaterSettings $settings, \CI_DB_query_builder $db, \DataCache $dataCache, \AutoUpdaterCurlClient $curl, \LogControl $logControl)
Checks if there are downloaded update, that not have been installed.
areUninstalledUpdatesAvailable() : boolean
Response
boolean
True, if uninstalled downloaded updates are available, otherwise false.
Checks if updates are available.
areUpdatesAvailable() : boolean
|
|
Throws |
- \AutoUpdaterException
If connection to update server failed.
|
Response
boolean
True, if updates are available, otherwise false.
Calls home and sends some feedback about the update processing
callHome(string $message, string $selectedUpdate = '', array $wrongPermittedFiles = array(), \Exception|null $exception = null)
Arguments
$wrongPermittedFiles
array
$exception
\Exception|null
Replaces the base directory path of a given file path with a new base directory path.
changeFileBasePath(string $file, string $oldBasePath, string $newBasePath) : string
inherited
Arguments
Response
string
Returns new path of the file. If an error occurs the unmodified file path will be returned.
Checks the writing permissions of all needed directories for an update by a given update files directory.
checkFilesPermissions(string $updateFilesDirectory) : array
Arguments
$updateFilesDirectory
string
Response
array
Checks the writing permissions of all needed directories for an update by a given update files directory.
checkFilesPermissionsWithFileList(string $fileList) : array
Copies a file.
copyFile(string $source, string $destination) : boolean
inherited
Arguments
Response
boolean
Copies the update files into the shop.
copyFilesIntoShop(string $updateFilesDirectory, integer|null $lastCopiedIndex = null) : integer|null
Throws |
- \AutoUpdaterMovingUpdateFilesFailedException
|
Arguments
$updateFilesDirectory
string
$lastCopiedIndex
integer|null
Response
integer|null
copyingFilesIntoShopDone
copyingFilesIntoShopDone() : mixed
Creates a new debug log.
createDebugLog(string $message, string|array $additionalData = '')
Arguments
$additionalData
string|array
Return true on success, otherwise false.
createDirectory(string $directory, boolean $writable = false) : boolean
inherited
Arguments
$directory
string
Path of the new directory.
Response
boolean
Deletes a directory. Return true on success and false otherwise.
deleteDirectory(string $directory) : boolean
inherited
Arguments
Response
boolean
Copies a file.
deleteFile(string $file) : boolean
inherited
Arguments
Response
boolean
Marks the admin infobox message with the given identifier as deleted.
deleteInfoboxMessage( $infoboxIdentifier)
Arguments
$infoboxIdentifier
string
Deletes a given update files directory.
deleteUpdateDirectory(string $updateFilesDirectory) : boolean
Arguments
$updateFilesDirectory
string
Response
boolean
Deletes the updates directory. Return true on success and false otherwise.
deleteUpdatesDirectory() : boolean
Returns the shop key from database.
determineDownloadedUpdates() : mixed
Returns the version receipts from filesystem.
determineExistingReceiptFiles() : mixed
Returns a db dump of the version history table as an array.
determineInstalledUpdates() : mixed
Returns the shop key.
determineShopKey() : mixed
Returns the shop key.
determineShopVersion() : mixed
Determines the version of the version info items while considering known edge cases.
determineUpdateName(string $receiptFilePath) : string
Arguments
Response
string
$version
Returns a list of all available updates as an array.
getAvailableUpdates() : array
|
|
Throws |
- \AutoUpdaterException
If connection to update server failed.
|
Response
array
Returns an array with all files inside a given directory and his subdirectories.
getDirectoryFiles(string $directory) : array
inherited
getLastCopiedIndex
getLastCopiedIndex() : mixed
getProcessingStatus
getProcessingStatus(string $updateId) : mixed
getProgress
getProgress() : float
Returns the update check response of the update server.
getUpdateCheckResponse()
|
|
|
|
Throws |
- \AutoUpdaterException
If connection to update server failed.
|
Checks the version history database table if the given version is installed.
hasUpdateBeenInstalled( $updateName) : boolean
Arguments
Response
boolean
Returns true, if the given version is installed, otherwise false.
Registers the auto updater ftp manager.
registerFtpManager(\AutoUpdaterFtpManager $ftpManager)
Removes the version history entry of an update by a given version history name.
resetVersionHistoryName( $versionHistoryName)
Arguments
$versionHistoryName
string
Sets the file permissions and ownership correctly.
setCorrectChmodAndOwner(string $file, null|string $chmod = null, null|string $owner = null) : boolean
inherited
Arguments
Response
boolean
setProcessingStatus
setProcessingStatus(string $updateId, $status) : mixed
Properties
settings
settings : \AutoUpdaterSettings
inherited
db
db : \CI_DB_query_builder
Type(s)
\CI_DB_query_builder
dataCache
dataCache : \DataCache
curl
curl : \AutoUpdaterCurlClient
updateStatus
updateStatus : array
availableUpdates
availableUpdates : array
ftpManager
ftpManager : \AutoUpdaterFtpManager
inherited
logControl
logControl : \LogControl
copyingFilesIntoShopDone
copyingFilesIntoShopDone : boolean
lastCopiedIndex
lastCopiedIndex : integer|null
progress
progress : float
ajaxTimeout
ajaxTimeout : integer
updateStatusLifetime
updateStatusLifetime : integer