class_NullCompressor.php

Go to the documentation of this file.
00001 <?php
00024 class NullCompressor extends BaseFrameworkSystem implements Compressor {
00030         protected function __construct () {
00031                 // Call parent constructor!
00032                 parent::__construct(__CLASS__);
00033         }
00034 
00040         public final static function createNullCompressor () {
00041                 // Get new instance
00042                 $cInstance = new NullCompressor();
00043 
00044                 // Return the compressor instance
00045                 return $cInstance;
00046         }
00047 
00055         public function compressStream ($streamData) {
00056                 if (is_object($streamData)) {
00057                         // Throw an exception
00058                         throw new InvalidObjectException($streamData, self::EXCEPTION_UNEXPECTED_OBJECT);
00059                 }
00060 
00061                 // Return the compressed stream
00062                 return $streamData;
00063         }
00064 
00072         public function decompressStream ($streamData) {
00073                 if (is_object($streamData)) {
00074                         // Throw an exception
00075                         throw new InvalidObjectException($streamData, self::EXCEPTION_UNEXPECTED_OBJECT);
00076                 }
00077 
00078                 // Return the decompressed stream
00079                 return $streamData;
00080         }
00081 
00087         public final function getCompressorExtension () {
00088                 return "null";
00089         }
00090 }
00091 
00092 // [EOF]
00093 ?>

Generated on Mon Dec 8 01:06:45 2008 for Ship-Simulator by  doxygen 1.5.6