PHP code example of jeyroik / extas-id

1. Go to this page and download the library: Download jeyroik/extas-id 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/ */

    

jeyroik / extas-id example snippets



use extas\interfaces\IHaveStringid;
use extas\components\THasStringId;
use extas\components\UUID;

class My implements IHaveStringId
{
    use THasStringId;

    protected array $config = [];
}

$my = new My();

UUID::setId($my, 4); 
echo $my->getId();// something like 0a961099-fd10-4f89-a128-2ae7c8ae5fef