1. Go to this page and download the library: Download phpgears/identity-extra 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/ */
phpgears / identity-extra example snippets
use Gears\Identity\Extra\ObjectIdIdentity;
use Gears\Identity\Extra\ObjectIdIdentityGenerator;
use MongoDB\BSON\ObjectId;
$identity = ObjectIdIdentity::fromString((string) new ObjectId());
// From generator
$identity = (new ObjectIdIdentityGenerator())->generate();
use Gears\Identity\Extra\UlidIdentity;
use Gears\Identity\Extra\UlidIdentityGenerator;
use Ulid\Ulid;
$identity = UlidIdentity::fromString((string) Ulid::generate());
// From generator
$identity = (new UlidIdentityGenerator())->generate();
use Gears\Identity\Extra\KsuidIdentity;
use Gears\Identity\Extra\KsuidIdentityGenerator;
use Tuupola\KsuidFactory;
$identity = KsuidIdentity::fromString((string) KsuidFactory::create());
// From generator
$identity = (new KsuidIdentityGenerator())->generate();
use Gears\Identity\Extra\XidIdentity;
use Gears\Identity\Extra\XidIdentityGenerator;
use Fpay\Xid\Generator;
$identity = XidIdentity::fromString((string) Generator::create());
// From generator
$identity = (new XidIdentityGenerator())->generate();
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.