ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ZipStructureDefinition Class Reference
+ Inheritance diagram for ZipStructureDefinition:
+ Collaboration diagram for ZipStructureDefinition:

Public Member Functions

 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...
 
 sleep (array $data)
 
 wake (string $data)
 

Detailed Description

Member Function Documentation

◆ getFlavourMachineId()

ZipStructureDefinition::getFlavourMachineId ( )

Defines the ID of the machine that supports this definition.

The machine MUST exist.

Implements ILIAS\ResourceStorage\Flavour\Definition\FlavourDefinition.

Definition at line 34 of file ZipStructureDefinition.php.

34  : string
35  {
36  return 'zip_structure_reader';
37  }

◆ getId()

ZipStructureDefinition::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 29 of file ZipStructureDefinition.php.

29  : string
30  {
31  return 'a6ac86ca80c33ac3e5bfd4fc8da30f05a888e4cfb17fda479ba9b6f08b1f33ba';
32  }

◆ getInternalName()

ZipStructureDefinition::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 39 of file ZipStructureDefinition.php.

39  : string
40  {
41  return 'Container Structure';
42  }

◆ getVariantName()

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

References null.

44  : ?string
45  {
46  return null;
47  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ persist()

ZipStructureDefinition::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 49 of file ZipStructureDefinition.php.

49  : bool
50  {
51  return true;
52  }

◆ sleep()

ZipStructureDefinition::sleep ( array  $data)

Definition at line 54 of file ZipStructureDefinition.php.

54  : string
55  {
56  return json_encode($data);
57  }

◆ wake()

ZipStructureDefinition::wake ( string  $data)

Definition at line 59 of file ZipStructureDefinition.php.

59  : array
60  {
61  return json_decode($data, true);
62  }

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