ILIAS
trunk Revision v11.0_alpha-2658-ge2404539063
◀ ilDoc Overview
Factory.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Data\UUID
;
22
23
use
Exception
;
24
use
Ramsey\Uuid\UuidFactory
;
25
32
class
Factory
33
{
34
private
UuidFactory
$uuid_factory
;
35
36
public
function
__construct
()
37
{
38
$this->uuid_factory =
new
UuidFactory();
39
}
40
41
public
function
uuid4
():
Uuid
42
{
43
return
new
RamseyUuidWrapper
($this->uuid_factory->uuid4());
44
}
45
46
public
function
uuid4AsString
(): string
47
{
48
return
$this->
uuid4
()->toString();
49
}
50
51
public
function
fromString
(
string
$uuid):
Uuid
52
{
53
return
new
RamseyUuidWrapper
($this->uuid_factory->fromString($uuid));
54
}
55
}
ILIAS\Data\UUID
Definition:
Factory.php:21
UuidFactory
ILIAS\Data\UUID\RamseyUuidWrapper
Definition:
RamseyUuidWrapper.php:31
ILIAS\Data\UUID\Factory
Definition:
Factory.php:32
ILIAS\Data\UUID\Uuid
Definition:
Uuid.php:29
ILIAS\Data\UUID\Factory\fromString
fromString(string $uuid)
Definition:
Factory.php:51
ILIAS\Data\UUID\Factory\uuid4AsString
uuid4AsString()
Definition:
Factory.php:46
ILIAS\Data\UUID\Factory\uuid4
uuid4()
Definition:
Factory.php:41
ILIAS\Data\UUID\Factory\__construct
__construct()
Definition:
Factory.php:36
ILIAS\Data\UUID\Factory\$uuid_factory
UuidFactory $uuid_factory
Definition:
Factory.php:34
Exception
components
ILIAS
Data
src
UUID
Factory.php
Generated on Tue Sep 2 2025 23:01:54 for ILIAS by
1.8.13 (using
Doxyfile
)