ILIAS  release_8 Revision v8.24
UUIDStringTrait.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24
31{
32 protected \ILIAS\Data\UUID\Factory $factory;
33
37 public function __construct()
38 {
39 $this->factory = new Factory();
40 }
41
42
43 public function getUUID(): string
44 {
45 try {
46 $unique_id = $this->factory->uuid4AsString();
47 } catch (\Exception $e) {
48 throw new \LogicException('Generating uuid failed: ' . $e->getMessage(), $e->getCode(), $e);
49 }
50 return $unique_id;
51 }
52}
__construct()
Constructor setup ILIAS global object @access public.
Definition: class.ilias.php:62
$factory
Definition: metadata.php:75
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
trait UUIDStringTrait
Class UniqueIDCollectionIdentificationGenerator.