summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 74a9181)
raw | patch | inline | side by side (parent: 74a9181)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 19 Sep 2007 07:23:52 +0000 (07:23 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 19 Sep 2007 07:23:52 +0000 (07:23 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7323 594d385d-05f5-0310-b6e9-bd551577e9d8
update-gosa | [new file with mode: 0755] | patch | blob |
diff --git a/update-gosa b/update-gosa
--- /dev/null
+++ b/update-gosa
@@ -0,0 +1,50 @@
+#!/usr/bin/php5
+<?php
+
+/* Function to include all class_ files starting at a given directory base */
+function get_classes($folder= ".")
+{
+ static $result= array();
+
+ $currdir=getcwd();
+ if ($folder){
+ chdir("$folder");
+ }
+
+ $dh = opendir(".");
+ while(false !== ($file = readdir($dh))){
+
+ if (preg_match("/.*\.svn.*/", $file) ||
+ preg_match("/.*smarty.*/i",$file) ||
+ preg_match("/.*\.tpl.*/",$file) ||
+ ($file==".") ||($file =="..")){
+ continue;
+ }
+
+ /* Recurse through all "common" directories */
+ if (is_dir($file)){
+ get_classes($file);
+ continue;
+ }
+
+ /* Include existing class_ files */
+ if (preg_match("/^class_.*\.inc$/", $file)) {
+
+ $result[]= "$currdir/$folder/$file";
+ }
+ }
+
+ closedir($dh);
+ chdir($currdir);
+
+ return ($result);
+}
+
+print_r(get_declared_classes());
+exit (0);
+$class_mapping= get_classes();
+foreach ($class_mapping as $key => $value){
+ echo "$key located in $value\n";
+}
+
+?>