Code

Updated Documentation.
[gosa.git] / gen_function_list.php
1 #!/usr/bin/php -q
2 <?php
3 /*
4 /*
5  * This code is part of GOsa (https://gosa.gonicus.de)
6  * Copyright (C) 2005 Jan Wenzel
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
23 include('include/functions_test.inc');
25 // Build Array of called functions
26 $array= test_defined_functions('./');
28 // Write List to file
29 $file= 'include/functions_list.inc';
31 // If file does not exist, create it
32 if(!file_exists($file)) {
33         touch($file);
34 }
36 // Write Array to file
37 if(is_writable($file)) {
38         // Open filehandle
39         $fh= fopen($file,'w');
40         if($fh != null) {
41                 fwrite($fh,"return(\n".var_export($array,true).");");
42                 fclose($fh);
43         }
44 }
45 ?>