X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fcompressor%2Fclass_GzipCompressor.php;h=9a4489b19276b8aaae665092b1a3958b7ab005a5;hb=b44e5e7347f9a1dbd49b5b47d506a4f6526caf2f;hp=f00b2d03252ceec0a07d9b7629965a69c185bb87;hpb=ff66822b5fb6a92f5dc8af55290ecb89ec7f1aaf;p=shipsimu.git diff --git a/inc/classes/main/compressor/class_GzipCompressor.php b/inc/classes/main/compressor/class_GzipCompressor.php index f00b2d0..9a4489b 100644 --- a/inc/classes/main/compressor/class_GzipCompressor.php +++ b/inc/classes/main/compressor/class_GzipCompressor.php @@ -3,9 +3,10 @@ * GZIP compression and decompression class * * @author Roland Haeder - * @version 0.0 + * @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.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 @@ -18,28 +19,23 @@ * 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() - )); + parent::__construct(__CLASS__); // Set description - $this->setPartDescr("GZIP-Kompressor"); + $this->setObjectDescription("GZIP compressor"); // Create an unique ID - $this->createUniqueID(); + $this->generateUniqueId(); } /** @@ -52,19 +48,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 @@ -74,8 +60,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) { @@ -91,8 +77,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) { @@ -111,9 +97,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"; } }