src/Cornford/Backup/Backup.php
protected function compressFile($filepath)
	{
		if (!$this->getBackupFilesystemInstance()->checkFunctionExists('gzencode')) {
			throw new BackupException('The method: "gzencode" isn\'t currently enabled.');
		}

		$compressedFilepath = $this->getCompressedFilepath($filepath);
		$this->getBackupFilesystemInstance()->writeCompressedFile($compressedFilepath, $filepath);
		$this->getBackupFilesystemInstance()->removeFile($filepath);

		return $compressedFilepath;
	}
protected function compressFile($filepath)
	{
		if (!$this->getBackupFilesystemInstance()->checkFunctionExists('gzencode')) {
			throw new BackupException('The method: "gzencode" isn\'t currently enabled.');
		}

		$compressedFilepath = $this->getCompressedFilepath($filepath);
		$this->getBackupFilesystemInstance()->writeCompressedFile($compressedFilepath, $filepath);
		$this->getBackupFilesystemInstance()->removeFile($filepath);

		return $compressedFilepath;
	}
protected function compressFile ( $ filepath ) { if ( ! $ this -> getBackupFilesystemInstance ( ) -> checkFunctionExists ( 'gzencode' ) ) { throw new BackupException ( 'The method: "gzencode" isn\'t currently enabled.' ) ; } $ compressedFilepath = $ this -> getCompressedFilepath ( $ filepath ) ; $ this -> getBackupFilesystemInstance ( ) -> writeCompressedFile ( $ compressedFilepath , $ filepath ) ; $ this -> getBackupFilesystemInstance ( ) -> removeFile ( $ filepath ) ; return $ compressedFilepath ; }
Compress a file with gzip.

@param string $filepath

@throws BackupException

@return string
Compress a file with gzip .