cvs: pear /PEAR_PackageFileManager PackageFileManager2.php
| From: | Laurent Laville | Date: | Sat, 14 Oct 2006 09:03:18 +0000 |
| Subject: | cvs: pear /PEAR_PackageFileManager PackageFileManager2.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-42537@lists.php.net to get a copy of this message | ||
farell Sat Oct 14 09:03:18 2006 UTC
Modified files:
/pear/PEAR_PackageFileManager PackageFileManager2.php
Log:
Optional restrict get options list to replacement tasks what use huge class instances (one for
each task file)
Much easy to see a var_dump with $pkg->getOptions(true); when options
"clearcontents" is set to false in PFM 1.6.0 b5
http://cvs.php.net/viewvc.cgi/pear/PEAR_PackageFileManager/PackageFileManager2.php?r1=1.54&r2=1.55&diff_format=u
Index: pear/PEAR_PackageFileManager/PackageFileManager2.php
diff -u pear/PEAR_PackageFileManager/PackageFileManager2.php:1.54
pear/PEAR_PackageFileManager/PackageFileManager2.php:1.55
--- pear/PEAR_PackageFileManager/PackageFileManager2.php:1.54 Fri Oct 6 12:10:55 2006
+++ pear/PEAR_PackageFileManager/PackageFileManager2.php Sat Oct 14 09:03:18 2006
@@ -14,7 +14,7 @@
* @author Greg Beaver <cellog@php.net>
* @copyright 2005-2006 The PHP Group
* @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version CVS: $Id: PackageFileManager2.php,v 1.54 2006/10/06 12:10:55 farell Exp $
+ * @version CVS: $Id: PackageFileManager2.php,v 1.55 2006/10/14 09:03:18 farell Exp $
* @link http://pear.php.net/package/PEAR_PackageFileManager
* @since File available since Release 1.6.0
*/
@@ -826,13 +826,20 @@
/**
* Get the existing options
*
+ * @param bool $withTasks (optional) Returns full options (=false)
+ * or with replacements (=true)
* @return array
* @access public
* @since 1.6.0a1
*/
- function getOptions()
+ function getOptions($withTasks = false)
{
- return $this->_options;
+ if ($withTasks === false) {
+ return $this->_options;
+ }
+ $opt = $this->_options;
+ unset($opt['replacements']);
+ return $opt;
}
/**