PHP class to split large data into smaller chunks for use in web apps