cvs: pear /File_SearchReplace SearchReplace.php
| From: | anatoly techtonik | Date: | Sun, 13 Mar 2005 16:19:35 +0000 |
| Subject: | cvs: pear /File_SearchReplace SearchReplace.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-30245@lists.php.net to get a copy of this message | ||
techtonik Sun Mar 13 11:19:35 2005 EDT
Modified files:
/pear/File_SearchReplace SearchReplace.php
Log:
* Introduce doReplace method
http://cvs.php.net/diff.php/pear/File_SearchReplace/SearchReplace.php?r1=1.12&r2=1.13&ty=u
Index: pear/File_SearchReplace/SearchReplace.php
diff -u pear/File_SearchReplace/SearchReplace.php:1.12
pear/File_SearchReplace/SearchReplace.php:1.13
--- pear/File_SearchReplace/SearchReplace.php:1.12 Fri Mar 11 15:32:40 2005
+++ pear/File_SearchReplace/SearchReplace.php Sun Mar 13 11:19:34 2005
@@ -32,7 +32,7 @@
// | Author: Richard Heyes <richard@phpguru.org> |
// +-----------------------------------------------------------------------+
//
-// $Id: SearchReplace.php,v 1.12 2005/03/11 20:32:40 techtonik Exp $
+// $Id: SearchReplace.php,v 1.13 2005/03/13 16:19:34 techtonik Exp $
//
// Search and Replace Utility
//
@@ -511,13 +511,28 @@
// {{{ doSearch()
/**
- * This starts the search/replace off. Call this to do the search.
+ * This starts the search/replace off. The behavior of this function will likely
+ * to be changed in future versions to work in read only mode. If you want to do
+ * actual replace with writing files - use doReplace method instead.
+ *
+ * @access public
+ */
+ function doSearch()
+ {
+ $this->doReplace();
+ }
+
+ // }}}
+ // {{{ doReplace()
+
+ /**
+ * This starts the search/replace off. Call this to do the replace.
* First do whatever files are specified, and/or if directories are specified,
* do those too.
*
* @access public
*/
- function doSearch()
+ function doReplace()
{
$this->occurences = 0;
if ($this->find != '') {