1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
UuidGenerator.php
См. документацию.
1
<?php
2
3
declare(strict_types=1);
4
5
namespace
Bitrix\Main;
6
7
use Bitrix\Main\Security\Random;
8
9
class
UuidGenerator
10
{
11
public
static
function
generateV4
(): string
12
{
13
$data
= Random::getBytes(16);
14
15
$data
[6] = chr(ord(
$data
[6]) & 0x0f | 0x40);
16
$data
[8] = chr(ord(
$data
[8]) & 0x3f | 0x80);
17
18
return
vsprintf(
'%s%s-%s-%s-%s-%s%s%s'
, str_split(bin2hex(
$data
), 4));
19
}
20
}
Bitrix\Main\UuidGenerator
Определения
UuidGenerator.php:10
Bitrix\Main\UuidGenerator\generateV4
static generateV4()
Определения
UuidGenerator.php:11
$data
$data['IS_AVAILABLE']
Определения
.description.php:13
bitrix
modules
main
lib
UuidGenerator.php
Создано системой
1.14.0