REST webservices made in php with db connection class