ok using usort with a function is not so complicated
This is what i had before in my linear code
function merchantSort($a,$b){ return ....// stuf
Make your sort function static:
private static function merchantSort($a,$b) { return ...// the sort }
And use an array for the second parameter:
$array = $this->someThingThatReturnAnArray(); usort($array, array('ClassName','merchantSort'));