|
@@ -6,12 +6,10 @@
|
|
|
* 但是,其BackOffice的调试页面比较习惯,故此仿写了一个.
|
|
|
* @author gwang (mail@wanggangzero.cn)
|
|
|
*/
|
|
|
-class Debug
|
|
|
-{
|
|
|
+class Debug {
|
|
|
|
|
|
//put your code here
|
|
|
- public static function listMethod($class)
|
|
|
- {
|
|
|
+ public static function listMethod($class) {
|
|
|
$class_name = is_string($class) ? $class : get_class($class);
|
|
|
|
|
|
if (class_exists($class_name)) {
|
|
@@ -22,9 +20,7 @@ class Debug
|
|
|
$methods = $reflector->getMethods();
|
|
|
|
|
|
foreach ($methods as $method) {
|
|
|
-
|
|
|
- if (substr($method->name, 0, 1) == '_') {
|
|
|
- //methods starting with a '_' as they are reserved, so filter them out
|
|
|
+ if (substr($method->name, 0, 1) == '_') { # we appoint methods starting with a '_' as they are reserved, so filter them out.
|
|
|
continue;
|
|
|
}
|
|
|
$mname = $method->name;
|
|
@@ -41,8 +37,7 @@ class Debug
|
|
|
* @param type $method
|
|
|
* @return type
|
|
|
*/
|
|
|
- public static function fire_theme_method($class, $method)
|
|
|
- {
|
|
|
+ public static function fire_theme_method($class, $method) {
|
|
|
$fire_args = array();
|
|
|
|
|
|
$reflection = new ReflectionMethod($class, $method);
|