I have a PHP class with a number of public methods. I'm not in a PHP framework environment, so I don't have the option to access methods via URL routes that's common in frameworks (e.g. domain.com/myclass/mymethod/). However, I do want to be able to call those methods directly via Ajax.
How can I do this? Can Ajax POST some parameters to the class to instantiate it and call the appropriate method and pass it the parameters the method needs?