PHP code example of villermen / doctrine-identity-queuer
1. Go to this page and download the library: Download villermen/doctrine-identity-queuer 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/ */
villermen / doctrine-identity-queuer example snippets
use Villermen\DoctrineIdentityQueuer\IdentityQueuer;
$identityQueuer = new IdentityQueuer($entityManager);
$identityQueuer->queueIdentity(User::class, 1234);
$user = new User()
$entityManager->persist($user);
$entityManager->flush();
// $user should have been given an id of 1234 instead of an automatically generated one!