<?xml version="1.0"?><phpdoc><class name="File_SearchReplace" extends="" undoc="true" access="private"><file>c:/www/apache/doc2//pear/File/SearchReplace.php</file><doc></doc><function name="File_SearchReplace" undoc="false" access="public"><doc><author email="richard.heyes@heyes-computing.net">Richard Heyes</author><parameter name="$find" type="string">The string/regex to find.</parameter><parameter name="$replace" type="string">The string/regex to replace $find with.</parameter><parameter name="$files" type="array">The file(s) to perform this operation on.</parameter><parameter name="$directories" default="&amp;apos;&amp;apos;" type="string">(optional) The directories to perform this operation on.</parameter><parameter name="$include_subdir" default="1" type="integer">If performing on directories, whether to traverse subdirectories.</parameter><parameter name="$ignore_lines" default="array()" type="array">Ignore lines beginning with any of the strings in this array. This&#x0a;feature only works with the &amp;quot;normal&amp;quot; search.</parameter><return type="void"/><description/><shortdescription>Sets up the object</shortdescription></doc></function><function name="getNumOccurences" undoc="false" access="public"><doc><author email="richard.heyes@heyes-computing.net">Richard Heyes</author><return name="" type="int">Number of occurences found.</return><description/><shortdescription>Accessor to return the number of occurences found.</shortdescription></doc></function><function name="getLastError" undoc="false" access="public"><doc><author email="richard.heyes@heyes-computing.net">Richard Heyes</author><return name="" type="string">The last error that occurred, if any.</return><description/><shortdescription>Accessor for retrieving last error.</shortdescription></doc></function><function name="setFind" undoc="false" access="public"><doc><author email="richard.heyes@heyes-computing.net">Richard Heyes</author><parameter name="$find" type="string">The string/regex to find.</parameter><return type="void"/><description/><shortdescription>Accessor for setting find variable.</shortdescription></doc></function><function name="setReplace" undoc="false" access="public"><doc><author email="richard.heyes@heyes-computing.net">Richard Heyes</author><parameter name="$replace" type="string">The string/regex to replace the find string/regex with.</parameter><return type="void"/><description/><shortdescription>Accessor for setting replace variable.</shortdescription></doc></function><function name="setFiles" undoc="false" access="public"><doc><author email="richard.heyes@heyes-computing.net">Richard Heyes</author><parameter name="$files" type="array">The file(s) to perform this operation on.</parameter><return type="void"/><description/><shortdescription>Accessor for setting files variable.</shortdescription></doc></function><function name="setDirectories" undoc="false" access="public"><doc><author email="richard.heyes@heyes-computing.net">Richard Heyes</author><parameter name="$directories" type="array">The directories to perform this operation on.</parameter><return type="void"/><description/><shortdescription>Accessor for setting directories variable.</shortdescription></doc></function><function name="setIncludeSubdir" undoc="false" access="public"><doc><author email="richard.heyes@heyes-computing.net">Richard Heyes</author><parameter name="$include_subdir" type="int">Whether to traverse subdirectories or not.</parameter><return type="void"/><description/><shortdescription>Accessor for setting include_subdir variable.</shortdescription></doc></function><function name="setIgnoreLines" undoc="false" access="public"><doc><author email="richard.heyes@heyes-computing.net">Richard Heyes</author><parameter name="$ignore_lines" type="array">Ignore lines beginning with any of the strings in this array. This&#x0a;feature only works with the &amp;quot;normal&amp;quot; search.</parameter><return type="void"/><description/><shortdescription>Accessor for setting ignore_lines variable.</shortdescription></doc></function><function name="setSearchFunction" undoc="false" access="public"><doc><author email="richard.heyes@heyes-computing.net">Richard Heyes</author><parameter name="$search_function" type="string">search function that should be used. Can be any one of:&#x0a;normal - Default search. Goes line by line. Ignore lines feature only works with this type.&#x0a;quick  - Uses str_replace for straight replacement throughout file. Quickest of the lot.&#x0a;preg   - Uses preg_replace(), so any regex valid with this function is valid here.&#x0a;ereg   - Uses ereg_replace(), so any regex valid with this function is valid here.</parameter><return type="void"/><description/><shortdescription>Function to determine which search function is used.</shortdescription></doc></function><function name="search" undoc="false" access="private"><doc><author email="richard.heyes@heyes-computing.net">Richard Heyes</author><parameter name="$filename" type="string">The filename to search and replace upon.</parameter><return name="" type="array">Will return an array containing the new file contents and the number of occurences.&#x0a;Will return FALSE if there are no occurences.</return><description/><shortdescription>Default (&amp;quot;normal&amp;quot;) search routine.</shortdescription></doc></function><function name="quickSearch" undoc="false" access="private"><doc><author email="richard.heyes@heyes-computing.net">Richard Heyes</author><parameter name="$filename" type="string">The filename to search and replace upon.</parameter><return name="" type="array">Will return an array containing the new file contents and the number of occurences.&#x0a;Will return FALSE if there are no occurences.</return><description/><shortdescription>Quick search routine.</shortdescription></doc></function><function name="pregSearch" undoc="false" access="private"><doc><author email="richard.heyes@heyes-computing.net">Richard Heyes</author><parameter name="$filename" type="string">The filename to search and replace upon.</parameter><return name="" type="array">Will return an array containing the new file contents and the number of occurences.&#x0a;Will return FALSE if there are no occurences.</return><description/><shortdescription>Preg search routine.</shortdescription></doc></function><function name="eregSearch" undoc="false" access="private"><doc><author email="richard.heyes@heyes-computing.net">Richard Heyes</author><parameter name="$filename" type="string">The filename to search and replace upon.</parameter><return name="" type="array">Will return an array containing the new file contents and the number of occurences.&#x0a;Will return FALSE if there are no occurences.</return><description/><shortdescription>Ereg search routine.</shortdescription></doc></function><function name="writeout" undoc="false" access="private"><doc><author email="richard.heyes@heyes-computing.net">Richard Heyes</author><parameter name="$filename" type="string">The filename of the file to write.</parameter><parameter name="$contents" type="string">The contents to write to the file.</parameter><return type="void"/><description/><shortdescription>Function to writeout the file contents.</shortdescription></doc></function><function name="doFiles" undoc="false" access="private"><doc><author email="richard.heyes@heyes-computing.net">Richard Heyes</author><parameter name="$ser_func" type="string">The search function to use.</parameter><return type="void"/><description/><shortdescription>Function called by doSearch() to go through any files that need searching.</shortdescription></doc></function><function name="doDirectories" undoc="false" access="private"><doc><author email="richard.heyes@heyes-computing.net">Richard Heyes</author><parameter name="$ser_func" type="string">The search function to use.</parameter><return type="void"/><description/><shortdescription>Function called by doSearch() to go through any directories that need searching.</shortdescription></doc></function><function name="doSearch" undoc="false" access="public"><doc><author email="richard.heyes@heyes-computing.net">Richard Heyes</author><return type="void"/><description>First do whatever files are specified, and/or if directories are specified,do those too.</description><shortdescription>This starts the search/replace off. Call this to do the search.</shortdescription></doc></function><variable name="$find" access="private" type="unknown"><doc></doc></variable><variable name="$replace" access="private" type="unknown"><doc></doc></variable><variable name="$files" access="private" type="unknown"><doc></doc></variable><variable name="$directories" access="private" type="unknown"><doc></doc></variable><variable name="$include_subdir" access="private" type="unknown"><doc></doc></variable><variable name="$ignore_lines" access="private" type="unknown"><doc></doc></variable><variable name="$ignore_sep" access="private" type="unknown"><doc></doc></variable><variable name="$occurences" access="private" type="unknown"><doc></doc></variable><variable name="$search_function" access="private" type="unknown"><doc></doc></variable><variable name="$last_error" access="private" type="unknown"><doc></doc></variable></class></phpdoc>
