"->" means you are working with objects. 'Adding a function' would actually be adding a method to the object.
I'm afraid I can't help you much further than that since you will have to do some reverse engineering 🙁
Read up as much as you can about PHP's OOP functions, that'll get you a lot closer to figuring out how the scripts work.
Good luck!