In Magento, the Varien_Data_Collection
class makes provisions for sorting, but it ultimately leaves the work up to the extending class (usually Varien_Data_Collection_Db
) through the load
method.
But has anyone already done the work to make a generic instance of Varien_Data_Collection
sortable?
By that I mean using some crafty means of PHP's user-sorting functions. Not that I'm lazy, but it seems to be a lot of work to re-invent the wheel if it already exists.
Does anyone have a solution for this?