Update
class Update (View source)
The Update class handles the process of updating Automad using the dashboard.
Properties
static private | $timestamp | The update timestamp. |
Methods
Download version file and extract version number.
Test if the server supports all required functions.
Move currently installed items to /cache/update/backup.
Extract version number form content of version.php.
Download zip-archive to be installed.
Check if the server's PHP version matches the minimum requirements in the remote composer.json file.
Get items to be updated from config.
Log events to the update log file.
Test if permissions for all items to be updated are granted.
Preload required classes before removing old installation.
Unpack all item matching AM_UPDATE_ITEM.
Details
at line 69
static string
getVersion()
Download version file and extract version number.
at line 185
static bool
supported()
Test if the server supports all required functions.
at line 195
static private bool
backupCurrent(array $items)
Move currently installed items to /cache/update/backup.
at line 231
static private string
extractVersion(string $str)
Extract version number form content of version.php.
at line 244
static private string
getArchive()
Download zip-archive to be installed.
at line 283
static private string
higherPHPVersionRequired()
Check if the server's PHP version matches the minimum requirements in the remote composer.json file.
at line 324
static private array
items()
Get items to be updated from config.
at line 344
static private string
log(string $data)
Log events to the update log file.
at line 358
static private bool
permissionsGranted(array $items)
Test if permissions for all items to be updated are granted.
at line 373
static private
preloadClasses()
Preload required classes before removing old installation.
at line 388
static private bool
unpack(string $archive, array $items)
Unpack all item matching AM_UPDATE_ITEM.