ILIAS  release_7 Revision v7.30-3-g800a261c036
UniqueIDIdentificationGenerator.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2
4
6
13{
17 protected $factory;
18
22 public function __construct()
23 {
24 $this->factory = new Factory();
25 }
26
32 {
33 try {
34 $unique_id = $this->factory->uuid4AsString();
35 } catch (\Exception $e) {
36 throw new \LogicException('Generating uuid failed: ' . $e->getMessage());
37 } finally {
38 return new ResourceIdentification($unique_id);
39 }
40 }
41}
An exception for terminatinating execution or to throw for unit testing.