php-extended / php-uuid-object
An implementation of the php-uuid-interface library
7.0.7
2024-12-08 14:26 UTC
Requires
Requires (Dev)
- dev-master
- 7.0.7
- 7.0.6
- 7.0.5
- 7.0.4
- 7.0.3
- 7.0.2
- 7.0.1
- 7.0.0
- 6.0.7
- 6.0.6
- 6.0.5
- 6.0.4
- 6.0.3
- 6.0.2
- 6.0.1
- 6.0.0
- 5.0.1
- 5.0.0
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 3.4.10
- 3.4.9
- 3.4.8
- 3.4.7
- 3.4.6
- 3.4.5
- 3.4.4
- 3.4.3
- 3.4.2
- 3.4.1
- 3.4.0
- 3.3.0
- 3.2.18
- 3.2.17
- 3.2.16
- 3.2.15
- 3.2.14
- 3.2.13
- 3.2.12
- 3.2.11
- 3.2.10
- 3.2.9
- 3.2.8
- 3.2.7
- 3.2.6
- 3.2.5
- 3.2.4
- 3.2.3
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.0
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.0.0
- 1.0.1
- 1.0.0
This package is auto-updated.
Last update: 2024-12-08 13:27:04 UTC
README
An implementation of the php-uuid-interface library
Installation
The installation of this library is made via composer and the autoloading of all classes of this library is made through their autoloader.
- Download
composer.phar
from their website. - Then run the following command to install this library as dependency :
php composer.phar php-extended/php-uuid-object ^7
Basic Usage
This library may be used the following way :
use PhpExtended\Uuid\Uuid;
$uuid = new Uuid(0x01234567, 0x89ab, 0xcdef, 0xfe, 0xdc, 0xba9876, 0x543210);
$uuid->__toString(); // 01234567-89ab-cdef-fedc-ba9876543210
To parse an uuid :
use PhpExtended\Uuid\UuidParser;
$parser = new UuidParser();
$uuid = $parser->parse('<put here your uuid string>');
// $uuid instanceof UuidInterface
To create uuid on demand, do :
use PhpExtended\Uuid\UuidV4Factory();
$factory = new UuidV4Factory();
$uuid = $factory->create(); // 5F935265-8863-4672-FAB9-27097EF73660
License
MIT (See license file).