ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
PagesToExtract.php
Go to the documentation of this file.
1 <?php
18 declare(strict_types=1);
19 
21 
23 
29 {
30  public const FOREVER_ID = 'cbcb933538e2dfe9460d7a225f7b543b556ee580f41bd4f06cf16a4ca8dd8c8c';
31  private const QUALITY = 75;
32  private int $quality;
33  protected bool $persist;
34  protected int $max_size = 500;
35  protected int $max_pages = 5;
36  protected bool $fill = false;
37  protected bool $use_max_quality = false;
38 
39  public function __construct(
40  bool $persist,
41  int $max_size = 500,
42  int $max_pages = 5,
43  bool $fill = false,
44  int $quality = self::QUALITY
45  ) {
46  $this->persist = $persist;
47  $this->max_size = $max_size;
48  $this->max_pages = $max_pages;
49  $this->fill = $fill;
50  $this->quality = $quality;
51  }
52 
53  public function getId(): string
54  {
55  return self::FOREVER_ID;
56  }
57 
58  public function getFlavourMachineId(): string
59  {
60  return ExtractPages::ID;
61  }
62 
63  public function getMaxPages(): int
64  {
65  return $this->max_pages;
66  }
67 
68  public function getMaxSize(): int
69  {
70  return $this->max_size;
71  }
72 
73  public function isFill(): bool
74  {
75  return $this->fill;
76  }
77 
78  public function getQuality(): int
79  {
80  return $this->quality;
81  }
82 
83  public function useMaxQuality(): bool
84  {
86  }
87 
88 
89  public function getInternalName(): string
90  {
91  return 'extracted_pages';
92  }
93 
94  public function getVariantName(): ?string
95  {
96  return $this->max_size . 'x' . $this->max_size . ($this->fill ? '_fill' : '') . '_' . $this->getQuality();
97  }
98 
99  public function persist(): bool
100  {
101  return $this->persist;
102  }
103 }
getInternalName()
This defines the speaky internal name of the definition, as the consumer would like to use it...
persist()
Define whether the generated flavor and the respective streams should be persisted, or whether they should only be generated and used in-memory.
getFlavourMachineId()
Defines the ID of the machine that supports this definition.
__construct(bool $persist, int $max_size=500, int $max_pages=5, bool $fill=false, int $quality=self::QUALITY)
getVariantName()
If a definition can be used in several variants (e.g.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...