PHP Class Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy

Inheritance: extends Spatie\Backup\Tasks\Cleanup\CleanupStrategy
Exibir arquivo Open project: spatie/laravel-backup

Protected Properties

Property Type Description
$newestBackup Spatie\Backup\BackupDestination\Backup

Public Methods

Method Description
deleteOldBackups ( BackupCollection $backups )

Protected Methods

Method Description
calculateDateRanges ( ) : Collection
groupByDateFormat ( Collection $backups, string $dateFormat ) : Collection
removeBackupsForAllPeriodsExceptOne ( Collection $backupsPerPeriod )
removeBackupsOlderThan ( Carbon\Carbon $endDate, BackupCollection $backups )
removeOldBackupsUntilUsingLessThanMaximumStorage ( BackupCollection $backups )

Method Details

calculateDateRanges() protected method

protected calculateDateRanges ( ) : Collection
return Illuminate\Support\Collection

deleteOldBackups() public method

public deleteOldBackups ( BackupCollection $backups )
$backups Spatie\Backup\BackupDestination\BackupCollection

groupByDateFormat() protected method

protected groupByDateFormat ( Collection $backups, string $dateFormat ) : Collection
$backups Illuminate\Support\Collection
$dateFormat string
return Illuminate\Support\Collection

removeBackupsForAllPeriodsExceptOne() protected method

protected removeBackupsForAllPeriodsExceptOne ( Collection $backupsPerPeriod )
$backupsPerPeriod Illuminate\Support\Collection

removeBackupsOlderThan() protected method

protected removeBackupsOlderThan ( Carbon\Carbon $endDate, BackupCollection $backups )
$endDate Carbon\Carbon
$backups Spatie\Backup\BackupDestination\BackupCollection

removeOldBackupsUntilUsingLessThanMaximumStorage() protected method

protected removeOldBackupsUntilUsingLessThanMaximumStorage ( BackupCollection $backups )
$backups Spatie\Backup\BackupDestination\BackupCollection

Property Details

$newestBackup protected_oe property

protected Backup,Spatie\Backup\BackupDestination $newestBackup
return Spatie\Backup\BackupDestination\Backup