How to get list of functions that are declared in a php file
The simplest thing (after I saw @joachim answer) is to use get_defined_functions and then only watch for the 'user' key (which contains an array of user-defined methods)
This is the code that helped me solved the problem