public function BrowserDownloadDestination::checkWritable in Backup and Migrate 8.4
Overrides StreamDestination::checkWritable
File
- lib/
backup_migrate_core/ src/ Destination/ BrowserDownloadDestination.php, line 75
Class
- BrowserDownloadDestination
- Class BrowserDownloadDestination.
Namespace
BackupMigrate\Core\DestinationCode
public function checkWritable() {
// Check that we're running as a web process via a browser.
// @TODO: we could check if the 'HTTP_ACCEPT' header contains the right mime but that is probably overkill.
if (!isset($_SERVER['REQUEST_METHOD'])) {
throw new DestinationNotWritableException("The download destination only works when accessed through a http client.");
}
}