ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\ResourceStorage\Flavour\Flavour Class Reference
+ Inheritance diagram for ILIAS\ResourceStorage\Flavour\Flavour:
+ Collaboration diagram for ILIAS\ResourceStorage\Flavour\Flavour:

Public Member Functions

 __construct (private FlavourDefinition $definition, private ResourceIdentification $resource_id, private int $revision)
 
 getPersistingName ()
 Flavours are stored in the file system by the StroageHandler. More...
 
 getName ()
 
 getResourceId ()
 
 withStreamResolver (int $index, ?StreamResolver $stream_resolver=null)
 
 maybeStreamResolver (int $index)
 
 getStreamResolvers ()
 
 getDefinition ()
 
 getRevision ()
 

Private Attributes

array $streams = []
 
array $stream_resolvers = []
 

Detailed Description

Author
Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s

Definition at line 29 of file Flavour.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\ResourceStorage\Flavour\Flavour::__construct ( private FlavourDefinition  $definition,
private ResourceIdentification  $resource_id,
private int  $revision 
)

Definition at line 34 of file Flavour.php.

35  {
36  }

Member Function Documentation

◆ getDefinition()

ILIAS\ResourceStorage\Flavour\Flavour::getDefinition ( )

Definition at line 78 of file Flavour.php.

Referenced by ILIAS\ResourceStorage\Resource\Repository\FlavourDBRepository\store().

78  : FlavourDefinition
79  {
80  return $this->definition;
81  }
+ Here is the caller graph for this function:

◆ getName()

ILIAS\ResourceStorage\Flavour\Flavour::getName ( )

Definition at line 48 of file Flavour.php.

Referenced by ILIAS\ResourceStorage\Flavour\Flavour\getPersistingName().

48  : string
49  {
50  return $this->definition->getInternalName() . $this->definition->getVariantName();
51  }
+ Here is the caller graph for this function:

◆ getPersistingName()

ILIAS\ResourceStorage\Flavour\Flavour::getPersistingName ( )

Flavours are stored in the file system by the StroageHandler.

Thereby you use this hash. By crc32 these hashes have always a length of 8 characters. Possible collisions are accepted, because they are very unlikely.

Definition at line 43 of file Flavour.php.

References ILIAS\ResourceStorage\Flavour\Flavour\getName().

Referenced by ILIAS\ResourceStorage\Events\FlavourData\__construct(), and ILIAS\ResourceStorage\StorageHandler\FileSystemBased\AbstractFileSystemStorageHandler\getFlavourPath().

43  : string
44  {
45  return hash('crc32', $this->getName());
46  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getResourceId()

ILIAS\ResourceStorage\Flavour\Flavour::getResourceId ( )

Definition at line 53 of file Flavour.php.

Referenced by ILIAS\ResourceStorage\Flavour\FlavourBuilder\getCurrentRevision(), ILIAS\ResourceStorage\Flavour\FlavourBuilder\populateFlavourWithExistingStreams(), and ILIAS\ResourceStorage\Resource\Repository\FlavourDBRepository\store().

53  : ResourceIdentification
54  {
55  return $this->resource_id;
56  }
+ Here is the caller graph for this function:

◆ getRevision()

ILIAS\ResourceStorage\Flavour\Flavour::getRevision ( )

Definition at line 83 of file Flavour.php.

Referenced by ILIAS\ResourceStorage\Resource\Repository\FlavourDBRepository\store().

83  : int
84  {
85  return $this->revision;
86  }
+ Here is the caller graph for this function:

◆ getStreamResolvers()

ILIAS\ResourceStorage\Flavour\Flavour::getStreamResolvers ( )
Returns
StreamResolver[]

Definition at line 73 of file Flavour.php.

References ILIAS\ResourceStorage\Flavour\Flavour\$stream_resolvers.

Referenced by ilSecureTokenSrcBuilder\getFlavourURLs().

73  : array
74  {
76  }
+ Here is the caller graph for this function:

◆ maybeStreamResolver()

ILIAS\ResourceStorage\Flavour\Flavour::maybeStreamResolver ( int  $index)

Definition at line 65 of file Flavour.php.

References null.

65  : ?StreamResolver
66  {
67  return $this->stream_resolvers[$index] ?? null;
68  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ withStreamResolver()

ILIAS\ResourceStorage\Flavour\Flavour::withStreamResolver ( int  $index,
?StreamResolver  $stream_resolver = null 
)

Definition at line 58 of file Flavour.php.

58  : Flavour
59  {
60  $this->stream_resolvers[$index] = $stream_resolver;
61 
62  return $this;
63  }

Field Documentation

◆ $stream_resolvers

array ILIAS\ResourceStorage\Flavour\Flavour::$stream_resolvers = []
private

◆ $streams

array ILIAS\ResourceStorage\Flavour\Flavour::$streams = []
private

Definition at line 31 of file Flavour.php.


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