ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
BySize.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\ResourceStorage\Collection\Sorter
;
22
23
use
ILIAS\ResourceStorage\Identification\ResourceIdentification
;
24
31
class
BySize
extends
AbstractBaseSorter
implements
CollectionSorter
32
{
33
protected
function
sortResourceIdentification
(array $identifications): array
34
{
35
usort($identifications,
function
(
ResourceIdentification
$a
,
ResourceIdentification
$b
):
int
{
36
$a_size = $this->resource_builder->get($a)->getCurrentRevision()->getInformation()->getSize();
37
$b_size = $this->resource_builder->get($b)->getCurrentRevision()->getInformation()->getSize();
38
return
$a_size - $b_size;
39
});
40
return
$identifications;
41
}
42
}
ILIAS\ResourceStorage\Collection\Sorter\BySize\sortResourceIdentification
sortResourceIdentification(array $identifications)
Definition:
BySize.php:33
ILIAS\ResourceStorage\Collection\Sorter
Definition:
AbstractBaseSorter.php:21
ResourceIdentification
ILIAS\ResourceStorage\Identification\ResourceIdentification
Class ResourceIdentification.
Definition:
ResourceIdentification.php:30
ILIAS\ResourceStorage\Collection\Sorter\AbstractBaseSorter
Class AbstractBaseSorter.
Definition:
AbstractBaseSorter.php:32
ILIAS\ResourceStorage\Collection\Sorter\BySize
Class BySize.
Definition:
BySize.php:31
Vendor\Package\$b
$b
Definition:
example_cleaned.php:49
ILIAS\ResourceStorage\Collection\Sorter\CollectionSorter
Interface CollectionSorter.
Definition:
CollectionSorter.php:31
Vendor\Package\$a
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
Definition:
example_cleaned.php:49
src
ResourceStorage
Collection
Sorter
BySize.php
Generated on Sat Apr 12 2025 22:02:54 for ILIAS by
1.8.13 (using
Doxyfile
)