ILIAS
release_8 Revision v8.23
◀ ilDoc Overview
Factory.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
5
namespace
ILIAS\Data\UUID
;
6
7
use
Exception
;
8
use
Ramsey\Uuid\UuidFactory
;
9
16
class
Factory
17
{
18
private
UuidFactory
$uuid_factory
;
19
20
public
function
__construct
()
21
{
22
$this->uuid_factory =
new
UuidFactory();
23
}
24
25
public
function
uuid4
():
Uuid
26
{
27
return
new
RamseyUuidWrapper
($this->uuid_factory->uuid4());
28
}
29
30
public
function
uuid4AsString
(): string
31
{
32
return
$this->
uuid4
()->toString();
33
}
34
35
public
function
fromString
(
string
$uuid):
Uuid
36
{
37
return
new
RamseyUuidWrapper
($this->uuid_factory->fromString($uuid));
38
}
39
}
ILIAS\Data\UUID
Definition:
Factory.php:5
UuidFactory
ILIAS\Data\UUID\RamseyUuidWrapper
Definition:
RamseyUuidWrapper.php:15
ILIAS\Data\UUID\Uuid
Definition:
Uuid.php:13
Factory
ILIAS\Data\UUID\Factory\fromString
fromString(string $uuid)
Definition:
Factory.php:35
ILIAS\Data\UUID\Factory\uuid4AsString
uuid4AsString()
Definition:
Factory.php:30
ILIAS\Data\UUID\Factory\uuid4
uuid4()
Definition:
Factory.php:25
ILIAS\Data\UUID\Factory\__construct
__construct()
Definition:
Factory.php:20
ILIAS\Data\UUID\Factory\$uuid_factory
UuidFactory $uuid_factory
Definition:
Factory.php:18
Exception
src
Data
UUID
Factory.php
Generated on Wed Sep 3 2025 22:02:50 for ILIAS by
1.8.13 (using
Doxyfile
)