[ Index ] |
|
Code source de LifeType 1.2.4 |
1 <?php 2 3 // default paths where 'tar', 'gzip', 'bzip2', 'unrar', 'unzip' can be found... 4 // this should be true for at least linux-based machines (this is where they are 5 // located in my gentoo box) 6 define( "DEFAULT_TAR_PATH", "/bin/tar" ); 7 define( "DEFAULT_GZIP_PATH", "/bin/gzip" ); 8 define( "DEFAULT_BZIP2_PATH", "/bin/bzip2" ); 9 define( "DEFAULT_UNRAR_PATH", "/usr/bin/unrar" ); 10 define( "DEFAULT_UNZIP_PATH", "/usr/bin/unzip" ); 11 12 /** 13 * \ingroup File_Unpacker 14 * 15 * this is the interface that classes wishing to provide additional methods 16 * for unpacking files must implement. Of course PHP4 does not support native 17 * interface and so we have to resort to this kind of tricks but probably you 18 * already know the drill :) 19 */ 20 class BaseUnpacker 21 { 22 23 function BaseUnpacker() 24 { 25 26 } 27 28 /** 29 * method that implements the logic for unpacking files ofa certain type 30 * 31 * @param file The file that we'd like to unpack 32 * @param destFolder the destination folder 33 * @return true if successful or false otherwise 34 */ 35 function unpack( $file, $destFolder ) 36 { 37 throw( new Exception( "This method must be implemented by child classes!" )); 38 39 die(); 40 } 41 } 42 43 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 21:04:15 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |