/**
  * Utility function to sort an array of objects on a given field
  *
  * @param   array  &$a             An array of objects
  * @param   mixed  $k              The key (string) or an array of keys to sort on
  * @param   mixed  $direction      Direction (integer) or an array of direction to sort in [1 = Ascending] [-1 = Descending]
  * @param   mixed  $caseSensitive  Boolean or array of booleans to let sort occur case sensitive or insensitive
  * @param   mixed  $locale         Boolean or array of booleans to let sort occur using the locale language or not
  *
  * @return  array  The sorted array of objects
  *
  * @since   11.1
  * @deprecated  4.0 Use Joomla\Utilities\ArrayHelper::sortObjects instead
  */
 public static function sortObjects(&$a, $k, $direction = 1, $caseSensitive = true, $locale = false)
 {
     if (!is_array($locale) || !is_array($locale[0])) {
         $locale = array($locale);
     }
     self::$sortCase = (array) $caseSensitive;
     self::$sortDirection = (array) $direction;
     self::$sortKey = (array) $k;
     self::$sortLocale = $locale;
     usort($a, array(__CLASS__, '_sortObjects'));
     self::$sortCase = null;
     self::$sortDirection = null;
     self::$sortKey = null;
     self::$sortLocale = null;
     return $a;
 }