html_writer::table accepts html_table object, not stdClass.