ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
CropToRectangle.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 
30 {
31  public const FOREVER_ID = '0fca4b6cf274bd4aac78caef9494f6f19e67366118548d5556f89fda5f683826';
32 
33  public function __construct(
34  protected bool $persist = false,
35  protected int $max_width = 512,
36  protected float $ratio = 16 / 9,
37  protected int $quality = 75
38  ) {
39  }
40 
41  public function getId(): string
42  {
43  return self::FOREVER_ID;
44  }
45 
46 
47  public function getFlavourMachineId(): string
48  {
49  return MaxRectangleSizeMachine::ID;
50  }
51 
52  public function getQuality(): int
53  {
54  return $this->quality;
55  }
56 
57  public function getMaxWidth(): int
58  {
59  return $this->max_width;
60  }
61 
62  public function getRatio(): float
63  {
64  return $this->ratio;
65  }
66 
67  public function getInternalName(): string
68  {
69  return 'crop_to_rectangle';
70  }
71 
72  public function getVariantName(): ?string
73  {
74  return $this->max_size . '_' . $this->ratio . '_' . $this->quality;
75  }
76 
77  public function persist(): bool
78  {
79  return $this->persist;
80  }
81 }
persist()
Define whether the generated flavor and the respective streams should be persisted, or whether they should only be generated and used in-memory.
__construct(protected bool $persist=false, protected int $max_width=512, protected float $ratio=16/9, protected int $quality=75)
getVariantName()
If a definition can be used in several variants (e.g.
getInternalName()
This defines the speaky internal name of the definition, as the consumer would like to use it...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getFlavourMachineId()
Defines the ID of the machine that supports this definition.