Looping through multi-page browse results?

Hi,

I’m working on a feature where the user can download specific files attached to the records in the current browse result as a zip file, whether it’s browsing all records, records in a particular collection or records in the current search result. This consists of a simple button in browse.php, plus some php code which creates the zip files using php’s ZipArchive. This works fine. However, if the current browse result contains more than 10 records, loop(‘items’) gives me access to the first 10 records only due to pagination. Is there a built in omeka function to loop through all the pages in the search result? Or some other way to grab the “raw”, unpaginated search results into an array? Thanks.