PHP Rest Class