cvs: pear /File_Archive Archive.php package.xml

From: Date: Wed, 08 Jun 2005 13:10:58 +0000
Subject: cvs: pear /File_Archive Archive.php package.xml
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-32426@lists.php.net to get a copy of this message
vincentlascaux Wed Jun 8 09:10:58 2005 EDT Modified files: /pear/File_Archive Archive.php package.xml Log: Bug #4548 + prepare for release http://cvs.php.net/diff.php/pear/File_Archive/Archive.php?r1=1.70&r2=1.71&ty=u Index: pear/File_Archive/Archive.php diff -u pear/File_Archive/Archive.php:1.70 pear/File_Archive/Archive.php:1.71 --- pear/File_Archive/Archive.php:1.70 Mon Jun 6 09:55:14 2005 +++ pear/File_Archive/Archive.php Wed Jun 8 09:10:57 2005 @@ -27,7 +27,7 @@ * @author Vincent Lascaux <vincentlascaux@php.net> * @copyright 1997-2005 The PHP Group * @license http://www.gnu.org/copyleft/lesser.html LGPL - * @version CVS: $Id: Archive.php,v 1.70 2005/06/06 13:55:14 vincentlascaux Exp $ + * @version CVS: $Id: Archive.php,v 1.71 2005/06/08 13:10:57 vincentlascaux Exp $ * @link http://pear.php.net/package/File_Archive */ @@ -37,14 +37,6 @@ */ require_once "PEAR.php"; -$_File_Archive_Options = array( - 'zipCompressionLevel' => 9, - 'gzCompressionLevel' => 9, - 'tmpDirectory' => '.', - 'cache' => null, - 'appendRemoveDuplicates' => false -); - /** * Factory to access the most common File_Archive features * It uses lazy include, so you dont have to include the files from @@ -52,6 +44,17 @@ */ class File_Archive { + function& _option($name) + { + static $container = array( + 'zipCompressionLevel' => 9, + 'gzCompressionLevel' => 9, + 'tmpDirectory' => '.', + 'cache' => null, + 'appendRemoveDuplicates' => false + ); + return $container[$name]; + } /** * Sets an option that will be used by default by all readers or writers * Option names are case sensitive @@ -85,8 +88,8 @@ */ function setOption($name, $value) { - global $_File_Archive_Options; - $_File_Archive_Options[$name] = $value; + $option =& File_Archive::_option($name); + $option = $value; } /** @@ -95,8 +98,7 @@ */ function getOption($name) { - global $_File_Archive_Options; - return $_File_Archive_Options[$name]; + return File_Archive::_option($name); } /** @@ -278,7 +280,7 @@ //We have to build a regexp here $regexp = str_replace( array('\*', '\?'), - array('.*', '.'), + array('[^/]*', '[^/]'), preg_quote($lastFile) ); $result = File_Archive::_readSource($source, $baseFile, http://cvs.php.net/diff.php/pear/File_Archive/package.xml?r1=1.22&r2=1.23&ty=u Index: pear/File_Archive/package.xml diff -u pear/File_Archive/package.xml:1.22 pear/File_Archive/package.xml:1.23 --- pear/File_Archive/package.xml:1.22 Sun Jun 5 14:21:44 2005 +++ pear/File_Archive/package.xml Wed Jun 8 09:10:57 2005 @@ -25,28 +25,11 @@ </maintainer> </maintainers> <release> - <version>1.4.0</version> - <date></date> + <version>1.4.1</version> + <date>2005-06-08</date> <state>stable</state> <notes> - + Add the possibility to use Cache_Lite to cache intermediary output of Zip compression - + Add get and setOption method to change the default behavior of readers and writers - Available options are - - zipCompressionLevel: default compression level of zip archives (default is 9) - - gzCompressionLevel: default compression level of gz archives (default is 9) - - tmpDirectory: directory where temporary files will be stored (default is '.') - - cache: instance of Cache_Lite that may be used by any writer to cache data - for future use. Currently used by Zip writer (default is null: no cache) - - appendRemoveDuplicates: specify if the appenders should remove the old files - from an archive to avoid creating duplicates (default is false, which is faster) - + Add the possibility to use wildcards in read function - File_Archive::read('dir/*.txt') will read all txt files from directory dir - File_Archive::read('archive.zip/*.txt') will read all txt files from the zip archive - Note: The wildcards can only be used after the last '/' - + All the File_Archive functions that take a reader or a writer as an argument can now take - a string or an array. For readers, strings are interpreted using File_Archive::read function - and array using File_Archive::readMulti. For writers, strings are interpreted using File_Archive::appender - function and array by creating a multi writer. + Bug #4548 </notes> <filelist> <dir name="File" role="php"> @@ -130,6 +113,31 @@ <changelog> <release> + <version>1.4.0</version> + <date>2005-06-06</date> + <state>stable</state> + <notes> + + Add the possibility to use Cache_Lite to cache intermediary output of Zip compression + + Add get and setOption method to change the default behavior of readers and writers + Available options are + - zipCompressionLevel: default compression level of zip archives (default is 9) + - gzCompressionLevel: default compression level of gz archives (default is 9) + - tmpDirectory: directory where temporary files will be stored (default is '.') + - cache: instance of Cache_Lite that may be used by any writer to cache data + for future use. Currently used by Zip writer (default is null: no cache) + - appendRemoveDuplicates: specify if the appenders should remove the old files + from an archive to avoid creating duplicates (default is false, which is faster) + + Add the possibility to use wildcards in read function + File_Archive::read('dir/*.txt') will read all txt files from directory dir + File_Archive::read('archive.zip/*.txt') will read all txt files from the zip archive + Note: The wildcards can only be used after the last '/' + + All the File_Archive functions that take a reader or a writer as an argument can now take + a string or an array. For readers, strings are interpreted using File_Archive::read function + and array using File_Archive::readMulti. For writers, strings are interpreted using File_Archive::appender + function and array by creating a multi writer. + </notes> + </release> + <release> <version>1.3.0</version> <date>2005-05-30</date> <state>stable</state>

« previous php.pear.cvs (#32426) next »