X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fclasses%2Fmain%2Fcompressor%2Fclass_GzipCompressor.php;h=b4a30253bd7052e8bc5fc231d84647186f280bf9;hb=df33e264f3246f80756d7e2da55d7f7c40f9088c;hp=0caae9f8090384fb26bd742fd3f4fc9d1e1ea126;hpb=6a235495afbc92d4116f94be590d40feb1ad7905;p=shipsimu.git diff --git a/inc/classes/main/compressor/class_GzipCompressor.php b/inc/classes/main/compressor/class_GzipCompressor.php index 0caae9f..b4a3025 100644 --- a/inc/classes/main/compressor/class_GzipCompressor.php +++ b/inc/classes/main/compressor/class_GzipCompressor.php @@ -3,10 +3,10 @@ * GZIP compression and decompression class * * @author Roland Haeder - * @version 0.3.0 - * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software * @license GNU GPL 3.0 or any newer version - * @link http://www.mxchange.org + * @link http://www.ship-simu.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,28 +19,17 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ class GzipCompressor extends BaseFrameworkSystem implements Compressor { /** - * Private constructor + * Protected constructor * * @return void */ - private function __construct () { + protected function __construct () { // Call parent constructor! - parent::constructor(__CLASS__); - - // Debug message - if (((defined('DEBUG_COMPRESSOR')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) $this->getDebugInstance()->output(sprintf("[%s:] Konstruktor erreicht.
\n", - $this->__toString() - )); - - // Set description - $this->setPartDescr("GZIP-Kompressor"); - - // Create an unique ID - $this->createUniqueID(); + parent::__construct(__CLASS__); } /** @@ -53,19 +42,9 @@ class GzipCompressor extends BaseFrameworkSystem implements Compressor { if ((function_exists('gzcompress')) && (function_exists('gzuncompress'))) { // Compressor can maybe be used $cInstance = new GzipCompressor(); - - // Debug message - if ((defined('DEBUG_COMPRESSOR')) || (defined('DEBUG_ALL'))) $cInstance->getDebugInstance()->output(sprintf("[%s:] GZIP-Kompression wird verwendet.
\n", - $cInstance->__toString() - )); } else { // Routines not found! $cInstance = null; - - // Debug message - if ((defined('DEBUG_COMPRESSOR')) || (defined('DEBUG_ALL'))) $cInstance->getDebugInstance()->output(sprintf("[%s:] GZIP-Kompressionsroutinen nicht gefunden.
\n", - $cInstance->__toString() - )); } // Return the compressor instance @@ -75,8 +54,8 @@ class GzipCompressor extends BaseFrameworkSystem implements Compressor { /** * GZIP compression stream * - * @param $streamData Mixed non-object stream data - * @return $streamData The compressed stream data + * @param $streamData Mixed non-object stream data + * @return $streamData The compressed stream data * @throws InvalidObjectException If the stream is an object */ public function compressStream ($streamData) { @@ -92,8 +71,8 @@ class GzipCompressor extends BaseFrameworkSystem implements Compressor { /** * GZIP decompression stream * - * @param $streamData Mixed non-object stream data - * @return $streamData The decompressed stream data + * @param $streamData Mixed non-object stream data + * @return $streamData The decompressed stream data * @throws InvalidObjectException If the stream is an object */ public function decompressStream ($streamData) { @@ -112,9 +91,6 @@ class GzipCompressor extends BaseFrameworkSystem implements Compressor { * @return $string Returns always "gz" */ public final function getCompressorExtension () { - if ((defined('DEBUG_COMPRESSOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:] Dateierweiterung angefordert.
\n", - $this->__toString() - )); return "gz"; } }