eZ Publish  [4.0]
ezforwardcompressionhandler.php
Go to the documentation of this file.
00001 <?php
00002 //
00003 // Definition of eZForwardCompressionHandler 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 ezgzipcompressionhandler.php
00032 */
00033 
00034 /*!
00035   \class eZForwardCompressionHandler ezgzipcompressionhandler.php
00036   \brief Handles files compressed with gzip
00037 
00038   This class is a wrapper of the eZGZIPZLIBCompressionHandler and
00039   eZGZIPShellCompressionHandler classes.
00040 */
00041 
00042 //include_once( 'lib/ezfile/classes/ezcompressionhandler.php' );
00043 
00044 class eZForwardCompressionHandler extends eZCompressionHandler
00045 {
00046     /*!
00047      See eZCompressionHandler::eZCompressionHandler
00048     */
00049     function eZForwardCompressionHandler( &$handler,
00050                                           $name, $identifier )
00051     {
00052         $this->ForwardHandler =& $handler;
00053         $this->eZCompressionHandler( $name, $identifier );
00054     }
00055 
00056     /*!
00057      \return the current handler which all requests are forwarded to.
00058     */
00059     function &forwardHandler()
00060     {
00061         return $this->ForwardHandler;
00062     }
00063 
00064     /*!
00065      \reimp
00066     */
00067     function doOpen( $filename, $mode )
00068     {
00069         return $this->ForwardHandler->doOpen( $filename, $mode );
00070     }
00071 
00072     /*!
00073      \reimp
00074     */
00075     function doClose()
00076     {
00077         return $this->ForwardHandler->doClose();
00078     }
00079 
00080     /*!
00081      \reimp
00082     */
00083     function doRead( $uncompressedLength = false )
00084     {
00085         return $this->ForwardHandler->doRead( $uncompressedLength );
00086     }
00087 
00088     /*!
00089      \reimp
00090     */
00091     function doWrite( $data, $uncompressedLength = false )
00092     {
00093         return $this->ForwardHandler->doWrite( $data, $uncompressedLength );
00094     }
00095 
00096     /*!
00097      \reimp
00098     */
00099     function doFlush()
00100     {
00101         return $this->ForwardHandler->doFlush();
00102     }
00103 
00104     /*!
00105      \reimp
00106     */
00107     function doSeek( $offset, $whence )
00108     {
00109         return $this->ForwardHandler->doSeek( $offset, $whence );
00110     }
00111 
00112     /*!
00113      \reimp
00114     */
00115     function doRewind()
00116     {
00117         return $this->ForwardHandler->doRewind();
00118     }
00119 
00120     /*!
00121      \reimp
00122     */
00123     function doTell()
00124     {
00125         return $this->ForwardHandler->doTell();
00126     }
00127 
00128     /*!
00129      \reimp
00130     */
00131     function doEOF()
00132     {
00133         return $this->ForwardHandler->doEOF();
00134     }
00135 
00136     /*!
00137      \reimp
00138     */
00139     function doPasstrough( $closeFile = true )
00140     {
00141         return $this->ForwardHandler->doPasstrough( $closeFile );
00142     }
00143 
00144     /*!
00145      \reimp
00146     */
00147     function compress( $source )
00148     {
00149         return $this->ForwardHandler->compress( $source );
00150     }
00151 
00152     /*!
00153      \reimp
00154     */
00155     function decompress( $source )
00156     {
00157         return $this->ForwardHandler->decompress( $source );
00158     }
00159 
00160     /*!
00161      \reimp
00162     */
00163     function error()
00164     {
00165         return $this->ForwardHandler->error();
00166     }
00167 
00168     /*!
00169      \reimp
00170     */
00171     function errorString()
00172     {
00173         return $this->ForwardHandler->errorString();
00174     }
00175 
00176     /*!
00177      \reimp
00178     */
00179     function errorNumber()
00180     {
00181         return $this->ForwardHandler->errorNumber();
00182     }
00183 
00184     /*!
00185      \reimp
00186      Duplicates the forward compression handler by calling duplicate() on the handler
00187      which gets the forwarded requests and then creates a new eZForwardCompressionHandler.
00188     */
00189     function duplicate()
00190     {
00191         $forwardCopy = $this->ForwardHandler->duplicate();
00192         $copy = new eZForwardCompressionHandler( $forwardCopy, $this->name(), $this->identifier() );
00193         return $copy;
00194     }
00195 }
00196 
00197 ?>