public static ArrayList<Method> getClassPublicMethod(PhpClass phpClass) { ArrayList<Method> methods = new ArrayList<Method>(); for (Method method : phpClass.getMethods()) { if (method.getAccess().isPublic() && !method.getName().startsWith("__")) { methods.add(method); } } return methods; }
private static ArrayList<Method> getImplementedMethods( @Nullable PhpClass phpClass, @NotNull Method method, ArrayList<Method> implementedMethods) { if (phpClass == null) { return implementedMethods; } Method[] methods = phpClass.getOwnMethods(); for (Method ownMethod : methods) { if (PhpLangUtil.equalsMethodNames(ownMethod.getName(), method.getName())) { implementedMethods.add(ownMethod); } } for (PhpClass interfaceClass : phpClass.getImplementedInterfaces()) { getImplementedMethods(interfaceClass, method, implementedMethods); } getImplementedMethods(phpClass.getSuperClass(), method, implementedMethods); return implementedMethods; }