ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
CropToSquare.php
Go to the documentation of this file.
1 <?php
18 declare(strict_types=1);
19 
21 
23 
29 {
30  public const FOREVER_ID = '013dd0d556b5716fe54f554623f92449bd0c86d80c698eaf3959b057b7a069a0';
31 
32  public function __construct(
33  protected bool $persist = false,
34  protected int $max_size = 512,
35  protected int $quality = 75
36  ) {
37  }
38 
39  public function getId(): string
40  {
41  return self::FOREVER_ID;
42  }
43 
44 
45  public function getFlavourMachineId(): string
46  {
47  return MaxSquareSizeMachine::ID;
48  }
49 
50  public function getQuality(): int
51  {
52  return $this->quality;
53  }
54 
55  public function getMaxSize(): int
56  {
57  return $this->max_size;
58  }
59 
60  public function getInternalName(): string
61  {
62  return 'crop_to_square';
63  }
64 
65  public function getVariantName(): ?string
66  {
67  return $this->max_size . '_' . $this->quality;
68  }
69 
70  public function persist(): bool
71  {
72  return $this->persist;
73  }
74 }
persist()
Define whether the generated flavor and the respective streams should be persisted, or whether they should only be generated and used in-memory.
getInternalName()
This defines the speaky internal name of the definition, as the consumer would like to use it...
__construct(protected bool $persist=false, protected int $max_size=512, protected int $quality=75)
getFlavourMachineId()
Defines the ID of the machine that supports this definition.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getVariantName()
If a definition can be used in several variants (e.g.