public static function asort_objects_by_method(array &$objects, $method, $sortflag = core_collator::SORT_STRING) {
        $original = $objects;
        foreach ($objects as $key => $object) {
            $objects[$key] = $object->{$method}();
        }
        $result = self::asort($objects, $sortflag);
        self::restore_array($objects, $original);
        return $result;
    }
public static function asort_objects_by_method(array &$objects, $method, $sortflag = core_collator::SORT_STRING) {
        $original = $objects;
        foreach ($objects as $key => $object) {
            $objects[$key] = $object->{$method}();
        }
        $result = self::asort($objects, $sortflag);
        self::restore_array($objects, $original);
        return $result;
    }
public static function asort_objects_by_method ( array & $ objects , $ method , $ sortflag = core_collator :: SORT_STRING ) { $ original = $ objects ; foreach ( $ objects as $ key => $ object ) { $ objects [ $ key ] = $ object -> { $ method } ( ) ; } $ result = self :: asort ( $ objects , $ sortflag ) ; self :: restore_array ( $ objects , $ original ) ; return $ result ; }
Locale aware sort of objects by a method in common to all objects

@param array $objects An array of objects to sort (handled by reference)
@param string $method The method to call to generate a value for comparison
@param int $sortflag One of core_collator::SORT_NUMERIC, core_collator::SORT_STRING, core_collator::SORT_NATURAL, core_collator::SORT_REGULAR
optionally "|" core_collator::CASE_SENSITIVE
@return bool True on success
Locale aware sort of objects by a method in common to all objects