Simple REST services in PHP (base class version)