phpgears/identity

0.1 2018-09-16 17:05 UTC

README

PHP version Latest Version License

Build Status Style Check Code Quality Code Coverage

Total Downloads Monthly Downloads

Identity

Identity objects for PHP

Installation

Composer

composer require phpgears/identity

Usage

Require composer autoload file

require './vendor/autoload.php';

By extending Gears\Identity\AbstractIdentity you can easily have an Identity classes

use Gears\Identity\AbstractIdentity;

class CustomIdentity extends AbstractIdentity
{
    public static function fromString(string $value)
    {
        // Check $value validity

        return new static($value);
    }
}

Most used identities use UUID values, for that reason there is already a Gears\Identity\UuidIdentity identity ready to be used

Contributing

Found a bug or have a feature request? Please open a new issue. Have a look at existing issues before.

See file CONTRIBUTING.md

License

See file LICENSE included with the source code for a copy of the license terms.