[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Definition of eZGZIPCompressionHandler class 4 // 5 // Created on: <13-Aug-2003 16:20:19 amos> 6 // 7 // SOFTWARE NAME: eZ publish 8 // SOFTWARE RELEASE: 3.9.0 9 // BUILD VERSION: 17785 10 // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS 11 // SOFTWARE LICENSE: GNU General Public License v2.0 12 // NOTICE: > 13 // This program is free software; you can redistribute it and/or 14 // modify it under the terms of version 2.0 of the GNU General 15 // Public License as published by the Free Software Foundation. 16 // 17 // This program is distributed in the hope that it will be useful, 18 // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 // GNU General Public License for more details. 21 // 22 // You should have received a copy of version 2.0 of the GNU General 23 // Public License along with this program; if not, write to the Free 24 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 25 // MA 02110-1301, USA. 26 // 27 // 28 29 /*! \file ezgzipcompressionhandler.php 30 */ 31 32 /*! 33 \class eZGZIPCompressionHandler ezgzipcompressionhandler.php 34 \brief Handles files compressed with gzip 35 36 This class is a wrapper of the eZGZIPZLIBCompressionHandler and 37 eZGZIPShellCompressionHandler classes. 38 39 Duplication of this handler is done by the eZForwardCompressionHandler class. 40 */ 41 42 include_once ( 'lib/ezfile/classes/ezforwardcompressionhandler.php' ); 43 include_once ( 'lib/ezfile/classes/ezgzipzlibcompressionhandler.php' ); 44 include_once ( 'lib/ezfile/classes/ezgzipshellcompressionhandler.php' ); 45 include_once ( 'lib/ezfile/classes/eznocompressionhandler.php' ); 46 47 class eZGZIPCompressionHandler extends eZForwardCompressionHandler 48 { 49 /*! 50 See eZCompressionHandler::eZCompressionHandler and eZForwardCompressionHandler::eZForwardCompressionHandler. 51 */ 52 function eZGZIPCompressionHandler() 53 { 54 if ( eZGZIPZLIBCompressionHandler::isAvailable() ) 55 $handler = new eZGZIPZLIBCompressionHandler(); 56 else if ( eZGZIPShellCompressionHandler::isAvailable() ) 57 $handler = new eZGZIPShellCompressionHandler(); 58 else 59 $handler = new eZNoCompressionHandler(); 60 $this->eZForwardCompressionHandler( $handler, 61 'GZIP', 'gzip' ); 62 } 63 64 /*! 65 Forwards the compression level to the current handler. 66 */ 67 function setCompressionLevel( $level ) 68 { 69 $handler =& $this->handler(); 70 if ( method_exists( $handler, 'setCompressionLevel' ) ) 71 $handler->setCompressionLevel( $level ); 72 } 73 74 /*! 75 Forwards the request for compression level to the current handler and returns the value. 76 */ 77 function compressionLevel() 78 { 79 $handler =& $this->handler(); 80 if ( method_exists( $handler, 'compressionLevel' ) ) 81 return $handler->compressionLevel(); 82 return false; 83 } 84 } 85 86 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |