src/Cornford/Backup/Backup.php
public function export($filename = null)
	{
		if (!$this->getEnabled()) {
			return false;
		}

		if ($filename === null) {
			$filename = $this->getFilename();
		}

		$path = $this->getPath();

		if (!$this->getBackupFilesystemInstance()->checkPathExists($path)) {
			throw new BackupExportException('Unable to export to path "' . $path . '" as it doesn\'t exist.');
		}

		$filepath = $path . '/' . $filename . '.' . $this->getBackupEngineInstance()->getFileExtension();

        $this->setWorkingFilepath($filepath);
		$result = $this->getBackupEngineInstance()->export($filepath);

		if ($result) {
			if ($this->getCompress()) {
				$filepath = $this->compressFile($filepath);
			}

			$this->setWorkingFilepath($filepath);
		} else {
			$this->removeTemporaryFiles($filepath, true);
			$this->setWorkingFilepath(null);
		}

		return $result;
	}
public function export($filename = null)
	{
		if (!$this->getEnabled()) {
			return false;
		}

		if ($filename === null) {
			$filename = $this->getFilename();
		}

		$path = $this->getPath();

		if (!$this->getBackupFilesystemInstance()->checkPathExists($path)) {
			throw new BackupExportException('Unable to export to path "' . $path . '" as it doesn\'t exist.');
		}

		$filepath = $path . '/' . $filename . '.' . $this->getBackupEngineInstance()->getFileExtension();

        $this->setWorkingFilepath($filepath);
		$result = $this->getBackupEngineInstance()->export($filepath);

		if ($result) {
			if ($this->getCompress()) {
				$filepath = $this->compressFile($filepath);
			}

			$this->setWorkingFilepath($filepath);
		} else {
			$this->removeTemporaryFiles($filepath, true);
			$this->setWorkingFilepath(null);
		}

		return $result;
	}
public function export ( $ filename = null ) { if ( ! $ this -> getEnabled ( ) ) { return false ; } if ( $ filename === null ) { $ filename = $ this -> getFilename ( ) ; } $ path = $ this -> getPath ( ) ; if ( ! $ this -> getBackupFilesystemInstance ( ) -> checkPathExists ( $ path ) ) { throw new BackupExportException ( 'Unable to export to path "' . $ path . '" as it doesn\'t exist.' ) ; } $ filepath = $ path . '/' . $ filename . '.' . $ this -> getBackupEngineInstance ( ) -> getFileExtension ( ) ; $ this -> setWorkingFilepath ( $ filepath ) ; $ result = $ this -> getBackupEngineInstance ( ) -> export ( $ filepath ) ; if ( $ result ) { if ( $ this -> getCompress ( ) ) { $ filepath = $ this -> compressFile ( $ filepath ) ; } $ this -> setWorkingFilepath ( $ filepath ) ; } else { $ this -> removeTemporaryFiles ( $ filepath , true ) ; $ this -> setWorkingFilepath ( null ) ; } return $ result ; }
Export database to file.

@param string $filename

@throws BackupExportException

@return boolean
Export database to file .