MySQL table to PHP class