|
eZ Publish
[4.0]
|
00001 <?php 00002 // 00003 // Definition of eZCompressionHandler class 00004 // 00005 // Created on: <13-Aug-2003 16:20:19 amos> 00006 // 00007 // ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## 00008 // SOFTWARE NAME: eZ Publish 00009 // SOFTWARE RELEASE: 4.0.x 00010 // COPYRIGHT NOTICE: Copyright (C) 1999-2008 eZ Systems AS 00011 // SOFTWARE LICENSE: GNU General Public License v2.0 00012 // NOTICE: > 00013 // This program is free software; you can redistribute it and/or 00014 // modify it under the terms of version 2.0 of the GNU General 00015 // Public License as published by the Free Software Foundation. 00016 // 00017 // This program is distributed in the hope that it will be useful, 00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 // GNU General Public License for more details. 00021 // 00022 // You should have received a copy of version 2.0 of the GNU General 00023 // Public License along with this program; if not, write to the Free 00024 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 00025 // MA 02110-1301, USA. 00026 // 00027 // 00028 // ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## 00029 // 00030 00031 /*! \file ezcompressionhandler.php 00032 */ 00033 00034 /*! 00035 \class eZCompressionHandler ezcompressionhandler.php 00036 \brief Interface for file handlers using compression 00037 00038 Generic interface for all file handlers using compression. 00039 00040 This class introduces two new functions from the eZFileHandler base class, 00041 they are compress() and decompress() and are used for string based 00042 compression. 00043 00044 \h1 Creating specific handlers 00045 00046 The compressor handlers must inherit from this class and reimplement 00047 some virtual functions. 00048 00049 For dealing with compressed strings the following functions must be reimplemented. 00050 compress() and decompress() 00051 00052 The handlers must also implement the virtual functions defined in eZFileHandler. 00053 00054 */ 00055 00056 //include_once( 'lib/ezfile/classes/ezfilehandler.php' ); 00057 00058 class eZCompressionHandler extends eZFileHandler 00059 { 00060 /*! 00061 Initializes the handler. Optionally the parameters \a $filename 00062 and \a $mode may be provided to automatically open the file. 00063 */ 00064 function eZCompressionHandler( $handlerIdentifier, $handlerName ) 00065 { 00066 $this->eZFileHandler( $handlerIdentifier, $handlerName ); 00067 } 00068 00069 /*! 00070 \pure 00071 Compress the \a $source string and return it as compressed data. 00072 */ 00073 function compress( $source ) 00074 { 00075 } 00076 00077 /*! 00078 \pure 00079 Decompress the \a $source string containing compressed data and return it as a string. 00080 */ 00081 function decompress( $source ) 00082 { 00083 } 00084 } 00085 00086 ?>