@@ -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
739729abstract 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
765748class 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