PHP code example of mhujer / jms-serializer-uuid
1. Go to this page and download the library: Download mhujer/jms-serializer-uuid library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mhujer / jms-serializer-uuid example snippets
$builder
->configureHandlers(function(JMS\Serializer\Handler\HandlerRegistry $registry) {
$registry->registerSubscribingHandler(new \Mhujer\JmsSerializer\Uuid\UuidSerializerHandler());
})
;
use JMS\Serializer\Annotation as JMS;
class User
{
/**
* @JMS\Type("uuid")
* @var \Ramsey\Uuid\UuidInterface
*/
public $id;
}