DefaultStrategy
extends CleanupStrategy
in package
Table of Contents
- $config : Repository
- $newestBackup : Backup
- __construct() : mixed
- deleteOldBackups() : mixed
- calculateDateRanges() : Collection
- groupByDateFormat() : Collection
- removeBackupsForAllPeriodsExceptOne() : mixed
- removeBackupsOlderThan() : mixed
- removeOldBackupsUntilUsingLessThanMaximumStorage() : mixed
Properties
$config
protected
Repository
$config
$newestBackup
protected
Backup
$newestBackup
Methods
__construct()
public
__construct(Repository $config) : mixed
Parameters
- $config : Repository
Return values
mixed —deleteOldBackups()
public
deleteOldBackups(BackupCollection $backups) : mixed
Parameters
- $backups : BackupCollection
Return values
mixed —calculateDateRanges()
protected
calculateDateRanges() : Collection
Return values
Collection —groupByDateFormat()
protected
groupByDateFormat(Collection $backups, string $dateFormat) : Collection
Parameters
- $backups : Collection
- $dateFormat : string
Return values
Collection —removeBackupsForAllPeriodsExceptOne()
protected
removeBackupsForAllPeriodsExceptOne(Collection $backupsPerPeriod) : mixed
Parameters
- $backupsPerPeriod : Collection
Return values
mixed —removeBackupsOlderThan()
protected
removeBackupsOlderThan(Carbon $endDate, BackupCollection $backups) : mixed
Parameters
- $endDate : Carbon
- $backups : BackupCollection
Return values
mixed —removeOldBackupsUntilUsingLessThanMaximumStorage()
protected
removeOldBackupsUntilUsingLessThanMaximumStorage(BackupCollection $backups) : mixed
Parameters
- $backups : BackupCollection