ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ILIAS\ResourceStorage\Flavours\DummyDefinition Class Reference
+ Inheritance diagram for ILIAS\ResourceStorage\Flavours\DummyDefinition:
+ Collaboration diagram for ILIAS\ResourceStorage\Flavours\DummyDefinition:

Public Member Functions

 __construct (string $id, string $machine_id, 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...
 

Private Attributes

string $id
 
string $machine_id
 
bool $persists = false
 

Detailed Description

Definition at line 26 of file DummyDefinition.php.

Constructor & Destructor Documentation

◆ __construct()

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

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 44 of file DummyDefinition.php.

References ILIAS\ResourceStorage\Flavours\DummyDefinition\$machine_id.

44  : string
45  {
46  return $this->machine_id;
47  }

◆ 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 39 of file DummyDefinition.php.

References ILIAS\ResourceStorage\Flavours\DummyDefinition\$id.

39  : string
40  {
41  return $this->id;
42  }

◆ 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 49 of file DummyDefinition.php.

49  : string
50  {
51  return 'foo';
52  }

◆ 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 54 of file DummyDefinition.php.

54  : ?string
55  {
56  return null;
57  }

◆ 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 59 of file DummyDefinition.php.

References ILIAS\ResourceStorage\Flavours\DummyDefinition\$persists.

59  : bool
60  {
61  return $this->persists;
62  }

Field Documentation

◆ $id

string ILIAS\ResourceStorage\Flavours\DummyDefinition::$id
private

◆ $machine_id

string ILIAS\ResourceStorage\Flavours\DummyDefinition::$machine_id
private

◆ $persists

bool ILIAS\ResourceStorage\Flavours\DummyDefinition::$persists = false
private

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