magento/magento2 — pull request #177 by colinmollenhour (2012-12-28 19:32:53+00:00)
Title: Add colleciton method "addAfterLoadCallback"

This patch adds a new method to Varien_Data_Collection_Db which allows one to queue up callbacks which will be called *after* the collection is loaded. This is important since some event observers (e.g. Mage_Review's product list observer) act on the loaded collection, but it may be that other event observers need to first modify the query (e.g. add a filter or join). By using callbacks the event observers that need to act on a loaded collection can just add a callback and leave the query unloaded so that other event observers can still modify the query.