Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function all()
 {
     $backups = array();
     /** @var SplFileInfo[] $files */
     $files = Finder::create()->in($this->directory)->files()->depth(0)->sortByModifiedTime();
     foreach ($files as $file) {
         $backups[] = Backup::fromFile($file->getPathname());
     }
     return $backups;
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 public function push($filename, LoggerInterface $logger)
 {
     $this->doRotate(Backup::fromFile($filename), $logger);
     return $this->destination->push($filename, $logger);
 }