ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
GDEngine.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 class GDEngine implements Engine
27 {
28  use PHPMemoryLimit;
29 
30  protected array $supported = [
31  'jpg',
32  'jpeg',
33  'png',
34  'gif',
35  'bmp',
36  'tiff',
37  'tif',
38  'webp'
39  ];
40 
41  public function __construct()
42  {
43  }
44 
45  public function supports(string $suffix): bool
46  {
47  return in_array(strtolower($suffix), $this->supported, true);
48  }
49 
50  public function isRunning(): bool
51  {
52  return extension_loaded('gd');
53  }
54 
55 }