File_SearchReplace API and versioning
| From: | anatoly techtonik | Date: | Fri, 11 Mar 2005 19:42:48 +0000 |
| Subject: | File_SearchReplace API and versioning | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-36656@lists.php.net to get a copy of this message | ||
Hello pear-dev,
I would like to do some changes to the API of File_SearchReplace
to make it possible to run in R/O mode just to count how many strings
will be replaced during actual phase.
For now replacement begins after you call doSearch function
which starts to read/write files immediately. I'd like it to be
renamed to doReplace, since it is more logically correct. After
I'd like to add functionality to doSearch, so it can be used to
return names and numbers for affected files.
That's all.
Technicall sluff:
doSearch() will be changed to doSearch($replace = FALSE)
and doReplace() will be implemented like that
doReplace() {
return doSearch(TRUE);
}
The only problem with API is that now replacement is done by default.
After modification it will be done explicitly. It is sure a BC break,
but how to estimate the impact?
Should I change version number?
Which version will be downloaded by new users if I change it?
Which version do I need if current is 1.0.1?
t
--