ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilAbstractUsersGalleryUserCollectionSorter.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2015 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once 'Services/User/Gallery/interfaces/interface.ilUsersGalleryUserCollectionSorter.php';
5
10{
16 abstract protected function compare(ilUsersGalleryUser $left, ilUsersGalleryUser $right);
17
21 final public function sort(array $users)
22 {
23 $that = $this;
24 uasort($users, function (ilUsersGalleryUser $left, ilUsersGalleryUser $right) use ($that) {
25 return $that->compare($left, $right);
26 });
27
28 return $users;
29 }
30}
An exception for terminatinating execution or to throw for unit testing.
compare(ilUsersGalleryUser $left, ilUsersGalleryUser $right)
Interface ilUsersGalleryUserCollectionSorter.
Interface ilUsersGalleryUser.