/** * method_invoke_all * @param String $method the method to invoke * @param mixed args...(Optionnal) * @return array of mixed results. */ function method_invoke_all($method, $parameters = array(), $merge = false, $interface = "Module") { $r = array(); $modules = get_all_modules($interface); foreach ($modules as $module) { $utils = array($module, $method, $parameters); if (method_exists($module, $method)) { if ($merge) { $r = array_merge($r, call_user_func_array("method_invoke", $utils)); } else { $r[] = call_user_func_array("method_invoke", $utils); } } } return $r; }
<table width="100%" border="0"> <tr> <td>>> <a href="install_modules.php"> Install New Module</a> <br /> <table width="100%" border="0"> <tr> <td><b>Name</b></td> <td><b>Folder Name</b></td> <td><b>Active</b></td> <td><b>Action</b></td> </tr> <?php $modules = get_all_modules(); if ($modules == false) { echo "<br/>no module installed!<br/>"; } else { while (!$modules->EOF) { ?> <tr> <td><?php echo $modules->fields['name']; ?> </td> <td>/modules/<?php echo $modules->fields['folder_name']; ?> </td> <td><?php