Skip to content

Commit 1ef0dc4

Browse files
committed
Merge branch 'master' of https://github.com/gwarnants/mysqldump-php into gwarnants
2 parents 515ad5d + ac2d0b2 commit 1ef0dc4

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

src/Ifsnop/Mysqldump/Mysqldump.php

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -278,16 +278,6 @@ public function start($filename = '')
278278
$this->compressManager->close();
279279
}
280280

281-
/**
282-
* Returns written archive filename
283-
*
284-
* @return string
285-
*/
286-
public function getFilename()
287-
{
288-
return $this->compressManager->getArchiveFilename();
289-
}
290-
291281
/**
292282
* Returns header for dump file
293283
*
@@ -738,8 +728,6 @@ public static function isValid($c)
738728

739729
abstract class CompressManagerFactory
740730
{
741-
protected $archiveFilename;
742-
743731
/**
744732
* @param string $c
745733
* @return CompressBzip2|CompressGzip|CompressNone
@@ -755,11 +743,6 @@ public static function create($c)
755743

756744
return new $method;
757745
}
758-
759-
public function getArchiveFilename()
760-
{
761-
return $this->archiveFilename;
762-
}
763746
}
764747

765748
class CompressBzip2 extends CompressManagerFactory
@@ -775,8 +758,7 @@ public function __construct()
775758

776759
public function open($filename)
777760
{
778-
$this->archiveFilename = $filename . ".bz2";
779-
$this->fileHandler = bzopen($this->archiveFilename, "w");
761+
$this->fileHandler = bzopen($filename, "w");
780762
if (false === $this->fileHandler) {
781763
throw new Exception("Output file is not writable");
782764
}
@@ -811,8 +793,7 @@ public function __construct()
811793

812794
public function open($filename)
813795
{
814-
$this->archiveFilename = $filename . ".gz";
815-
$this->fileHandler = gzopen($this->archiveFilename, "wb");
796+
$this->fileHandler = gzopen($filename, "wb");
816797
if (false === $this->fileHandler) {
817798
throw new Exception("Output file is not writable");
818799
}
@@ -840,8 +821,7 @@ class CompressNone extends CompressManagerFactory
840821

841822
public function open($filename)
842823
{
843-
$this->archiveFilename = $filename;
844-
$this->fileHandler = fopen($this->archiveFilename, "wb");
824+
$this->fileHandler = fopen($filename, "wb");
845825
if (false === $this->fileHandler) {
846826
throw new Exception("Output file is not writable");
847827
}

0 commit comments

Comments
 (0)