ILIAS
trunk Revision v11.0_alpha-1723-g8e69f309bab
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
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
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
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
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
ImagickEngine.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\ResourceStorage\Flavour\Engine
;
22
26
class
ImagickEngine
implements
Engine
27
{
28
use
PHPMemoryLimit
;
29
protected
array
$whitelist
= [
30
'jpg'
,
31
'jpeg'
,
32
'gif'
,
33
'png'
,
34
'webp'
,
35
'webm'
,
36
'tiff'
,
37
'tif'
,
38
'bmp'
,
39
'pdf'
,
40
'pdf'
,
41
'svg'
,
42
];
43
protected
array
$supported
;
44
45
public
function
__construct
()
46
{
47
$this->supported = array_intersect(
48
array_map
(
49
fn($item):
string
=> strtolower($item),
50
\Imagick::queryFormats()
51
),
52
$this->whitelist
53
) ?? [];
54
}
55
56
public
function
supports
(
string
$suffix): bool
57
{
58
return
in_array(strtolower($suffix), $this->supported,
true
);
59
}
60
61
public
function
isRunning
(): bool
62
{
63
return
extension_loaded(
'imagick'
) && class_exists(\Imagick::class);
64
}
65
66
}
ILIAS\ResourceStorage\Flavour\Engine\ImagickEngine\__construct
__construct()
Definition:
ImagickEngine.php:45
array_map
ILIAS\ResourceStorage\Flavour\Engine\ImagickEngine\isRunning
isRunning()
Definition:
ImagickEngine.php:61
ILIAS\ResourceStorage\Flavour\Engine\ImagickEngine\$whitelist
array $whitelist
Definition:
ImagickEngine.php:29
ILIAS\ResourceStorage\Flavour\Engine\ImagickEngine
Definition:
ImagickEngine.php:26
ILIAS\ResourceStorage\Flavour\Engine\ImagickEngine\$supported
array $supported
Definition:
ImagickEngine.php:43
ILIAS\ResourceStorage\Flavour\Engine
Definition:
DefaultEngines.php:21
PHPMemoryLimit
ILIAS\ResourceStorage\Flavour\Engine\ImagickEngine\supports
supports(string $suffix)
Definition:
ImagickEngine.php:56
ILIAS\ResourceStorage\Flavour\Engine\Engine
Definition:
Engine.php:26
components
ILIAS
ResourceStorage
src
Flavour
Engine
ImagickEngine.php
Generated on Sun Apr 6 2025 23:03:58 for ILIAS by
1.8.13 (using
Doxyfile
)