JArrayHelper::sortObjects
Utility function to sort an array of objects on a given field
Signature
public function sortObjects(&
$a,
[mixed
$k = 1,
[mixed
$direction = 1,
[mixed
$caseSensitive = true,
[mixed
$locale = false]]]] )
Parameters
-
$a
-
$k
- The key (string) or a array of key to sort on
-
$direction
- Direction (integer) or an array of direction to sort in [1 = Ascending] [-1 = Descending]
-
$caseSensitive
- Boolean or array of booleans to let sort occur case sensitive or insensitive
-
$locale
- Boolean or array of booleans to let sort occur using the locale language or not
Returns
- array
- The sorted array of objects