Simple PHP class to create JSON-based REST APIs