Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
/*
4
 * This file is part of the Symfony package.
5
 *
6
 * (c) Fabien Potencier <fabien@symfony.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
 
12
use Symfony\Polyfill\Uuid as p;
13
 
14
if (!defined('UUID_VARIANT_NCS')) {
15
    define('UUID_VARIANT_NCS', 0);
16
}
17
if (!defined('UUID_VARIANT_DCE')) {
18
    define('UUID_VARIANT_DCE', 1);
19
}
20
if (!defined('UUID_VARIANT_MICROSOFT')) {
21
    define('UUID_VARIANT_MICROSOFT', 2);
22
}
23
if (!defined('UUID_VARIANT_OTHER')) {
24
    define('UUID_VARIANT_OTHER', 3);
25
}
26
if (!defined('UUID_TYPE_DEFAULT')) {
27
    define('UUID_TYPE_DEFAULT', 0);
28
}
29
if (!defined('UUID_TYPE_TIME')) {
30
    define('UUID_TYPE_TIME', 1);
31
}
32
if (!defined('UUID_TYPE_MD5')) {
33
    define('UUID_TYPE_MD5', 3);
34
}
35
if (!defined('UUID_TYPE_DCE')) {
36
    define('UUID_TYPE_DCE', 4); // Deprecated alias
37
}
38
if (!defined('UUID_TYPE_NAME')) {
39
    define('UUID_TYPE_NAME', 1); // Deprecated alias
40
}
41
if (!defined('UUID_TYPE_RANDOM')) {
42
    define('UUID_TYPE_RANDOM', 4);
43
}
44
if (!defined('UUID_TYPE_SHA1')) {
45
    define('UUID_TYPE_SHA1', 5);
46
}
47
if (!defined('UUID_TYPE_NULL')) {
48
    define('UUID_TYPE_NULL', -1);
49
}
50
if (!defined('UUID_TYPE_INVALID')) {
51
    define('UUID_TYPE_INVALID', -42);
52
}
53
 
54
if (!function_exists('uuid_create')) {
55
    function uuid_create(?int $uuid_type = \UUID_TYPE_DEFAULT): string { return p\Uuid::uuid_create((int) $uuid_type); }
56
}
57
if (!function_exists('uuid_generate_md5')) {
58
    function uuid_generate_md5(?string $uuid_ns, ?string $name): string { return p\Uuid::uuid_generate_md5((string) $uuid_ns, (string) $name); }
59
}
60
if (!function_exists('uuid_generate_sha1')) {
61
    function uuid_generate_sha1(?string $uuid_ns, ?string $name): string { return p\Uuid::uuid_generate_sha1((string) $uuid_ns, (string) $name); }
62
}
63
if (!function_exists('uuid_is_valid')) {
64
    function uuid_is_valid(?string $uuid): bool { return p\Uuid::uuid_is_valid((string) $uuid); }
65
}
66
if (!function_exists('uuid_compare')) {
67
    function uuid_compare(?string $uuid1, ?string $uuid2): int { return p\Uuid::uuid_compare((string) $uuid1, (string) $uuid2); }
68
}
69
if (!function_exists('uuid_is_null')) {
70
    function uuid_is_null(?string $uuid): bool { return p\Uuid::uuid_is_null((string) $uuid); }
71
}
72
if (!function_exists('uuid_type')) {
73
    function uuid_type(?string $uuid): int { return p\Uuid::uuid_type((string) $uuid); }
74
}
75
if (!function_exists('uuid_variant')) {
76
    function uuid_variant(?string $uuid): int { return p\Uuid::uuid_variant((string) $uuid); }
77
}
78
if (!function_exists('uuid_time')) {
79
    function uuid_time(?string $uuid): int { return p\Uuid::uuid_time((string) $uuid); }
80
}
81
if (!function_exists('uuid_mac')) {
82
    function uuid_mac(?string $uuid): string { return p\Uuid::uuid_mac((string) $uuid); }
83
}
84
if (!function_exists('uuid_parse')) {
85
    function uuid_parse(?string $uuid): string { return p\Uuid::uuid_parse((string) $uuid); }
86
}
87
if (!function_exists('uuid_unparse')) {
88
    function uuid_unparse(?string $uuid): string { return p\Uuid::uuid_unparse((string) $uuid); }
89
}