ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ILIAS\ResourceStorage\Flavours\DummyDefinition Class Reference
+ Inheritance diagram for ILIAS\ResourceStorage\Flavours\DummyDefinition:
+ Collaboration diagram for ILIAS\ResourceStorage\Flavours\DummyDefinition:

Public Member Functions

 __construct (private string $id, private string $machine_id, private bool $persists=false)
 
 getId ()
 
 getFlavourMachineId ()
 Defines the ID of the machine that supports this definition. More...
 
 getInternalName ()
 This defines the speaky internal name of the definition, as the consumer would like to use it, e.g. More...
 
 getVariantName ()
 If a definition can be used in several variants (e.g. More...
 
 persist ()
 Define whether the generated flavor and the respective streams should be persisted, or whether they should only be generated and used in-memory. More...
 

Detailed Description

Definition at line 26 of file DummyDefinition.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\ResourceStorage\Flavours\DummyDefinition::__construct ( private string  $id,
private string  $machine_id,
private bool  $persists = false 
)

Definition at line 28 of file DummyDefinition.php.

29  {
30  }

Member Function Documentation

◆ getFlavourMachineId()

ILIAS\ResourceStorage\Flavours\DummyDefinition::getFlavourMachineId ( )

Defines the ID of the machine that supports this definition.

The machine MUST exist.

Implements ILIAS\ResourceStorage\Flavour\Definition\FlavourDefinition.

Definition at line 37 of file DummyDefinition.php.

37  : string
38  {
39  return $this->machine_id;
40  }

◆ getId()

ILIAS\ResourceStorage\Flavours\DummyDefinition::getId ( )
Returns
string max. 64 characters, MUST be unique and NOT a class-related magic-constant. E.g. you can generate a random one with $ php -r"echo hash('sha256', uniqid());" | pbcopy in your shell and paste string in your getId() implementation.

If you ever change the ID, existing - maybe persisted - flavours created based on this definition will not be found anymore and have to be regenerated.

Implements ILIAS\ResourceStorage\Flavour\Definition\FlavourDefinition.

Definition at line 32 of file DummyDefinition.php.

References $id.

32  : string
33  {
34  return $this->id;
35  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

◆ getInternalName()

ILIAS\ResourceStorage\Flavours\DummyDefinition::getInternalName ( )

This defines the speaky internal name of the definition, as the consumer would like to use it, e.g.

to be able to distinguish between several flavors.

Implements ILIAS\ResourceStorage\Flavour\Definition\FlavourDefinition.

Definition at line 42 of file DummyDefinition.php.

42  : string
43  {
44  return 'foo';
45  }

◆ getVariantName()

ILIAS\ResourceStorage\Flavours\DummyDefinition::getVariantName ( )

If a definition can be used in several variants (e.g.

configurable size of a thumbnail), such variants must be distinguishable. For example, a variant name may contain "{height}x{width}" if these are configurable values.

The Variant-Name MUST be less than 768 characters long!

Implements ILIAS\ResourceStorage\Flavour\Definition\FlavourDefinition.

Definition at line 47 of file DummyDefinition.php.

References null.

47  : ?string
48  {
49  return null;
50  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ persist()

ILIAS\ResourceStorage\Flavours\DummyDefinition::persist ( )

Define whether the generated flavor and the respective streams should be persisted, or whether they should only be generated and used in-memory.

Implements ILIAS\ResourceStorage\Flavour\Definition\FlavourDefinition.

Definition at line 52 of file DummyDefinition.php.

52  : bool
53  {
54  return $this->persists;
55  }

The documentation for this class was generated from the following file: