public static diskNotSet ( ) : |
||
Результат |
public static function diskNotSet() : InvalidBackupDestination
{
return new static('There is no disk set for the backup destination');
}
public function write(string $file) { if (is_null($this->disk)) { throw InvalidBackupDestination::diskNotSet(); } $destination = $this->backupName . '/' . pathinfo($file, PATHINFO_BASENAME); $handle = fopen($file, 'r+'); $this->disk->getDriver()->writeStream($destination, $handle); }