protected static function InPlaceUpdate::getDeletions in Automatic Updates 7
Get an iterator of files to delete.
Return value
\ArrayIterator Iterator of files to delete.
2 calls to InPlaceUpdate::getDeletions()
- InPlaceUpdate::backup in ./
InPlaceUpdate.php - Backup before an update.
- InPlaceUpdate::processUpdate in ./
InPlaceUpdate.php - Process update.
File
- ./
InPlaceUpdate.php, line 499
Class
- InPlaceUpdate
- Class to apply in-place updates.
Code
protected static function getDeletions() {
$deletions = [];
if (!file_exists(self::getTempDirectory() . self::DELETION_MANIFEST)) {
return new \ArrayIterator($deletions);
}
$handle = fopen(self::getTempDirectory() . self::DELETION_MANIFEST, 'r');
if ($handle) {
while (($deletion = fgets($handle)) !== FALSE) {
if ($result = trim($deletion)) {
$deletions[] = $result;
}
}
fclose($handle);
}
return new \ArrayIterator($deletions);
}