function getClassMethods($class,$type = 'all') { $typeArr = array('public','protected','private','static','final','abstract'); $type = !in_array(strtolower($type),$typeArr) ? 'all' : 'is'.$type; $methods = array(); $reflection = new ReflectionClass($class); foreach($reflection ->getMethods() as $obj){ if('all' == $type) { $methods[] = $obj->name; }else { if(call_user_func(array(new ReflectionMethod($obj->class, $obj->name),$type))){ $methods[] = $obj->name; } } } return $methods; }