2017 © Pedro Peláez
 

library uuid

UUID allowing easy generation and assignment for event sourced systems

image

eig/uuid

UUID allowing easy generation and assignment for event sourced systems

  • Thursday, August 3, 2017
  • by excellentingenuity
  • Repository
  • 1 Watchers
  • 0 Stars
  • 437 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 11 Versions
  • 9 % Grown

The README.md

UUID

Build Status Latest Stable Version Coverage Status License StyleCI Total Downloads Latest Unstable Version, (*1)

Supported PHP Versions

  • 7.2
  • 7.3
  • 7.4
  • 8.0

Version Support

Description

A wrapper package for easy use of the excellent Ramsey\UUID package. Currently the package generates a version 4 UUID according to RFC 4122., (*2)

This package provides 2 methods of generating a UUID. 1. Static Facade UUID with a generate method. 2. AssignUUID Trait that defaults to a class variable of $id or accepts the string name of a class variable to assign the uuid to., (*3)

Static Method Example

use eig\UUID;

class Example {

    protected $id;

    public function __construct()
    {
        $this->id = UUID::generate();
    }
}

AssignUUID Trait Example

use eig\UUID\AssignUUID;

class Example
{
    use AssignUUID;

    /**
     * @var
     */
    protected $id;

    /**
     * Example constructor.
     */
    public function __construct ()
    {
        $this->assignUUID();
    }

    /**
     * getID
     * @return mixed
     */
    public function getID()
    {
        return $this->id;
    }
}

Or with a class variable other than $id, (*4)

use eig\UUID\AssignUUID;

/**
 * Class AlternateFieldExample
 * @package eig\UUID
 * @license MIT
 * @author James Johnson
 * @author Excellent InGenuity LLC
 */
class AlternateFieldExample
{
    use AssignUUID;

    /**
     * @var
     */
    protected $alternateID;

    /**
     * AlternateFieldExample constructor.
     */
    public function __construct ()
    {
        $this->assignUUID('alternateID');
    }

    /**
     * getAlternateID
     * @return mixed
     */
    public function getAlternateID()
    {
        return $this->alternateID;
    }
}

The Versions

03/08 2017

dev-dev

dev-dev https://github.com/excellentingenuity/UUID

UUID allowing easy generation and assignment for event sourced systems

  Sources   Download

MIT

The Requires

 

The Development Requires

by James Johnson

uuid event sourcing

03/08 2017

dev-master

9999999-dev https://github.com/excellentingenuity/UUID

UUID allowing easy generation and assignment for event sourced systems

  Sources   Download

MIT

The Requires

 

The Development Requires

by James Johnson

uuid event sourcing

03/08 2017

2.0.0

2.0.0.0 https://github.com/excellentingenuity/UUID

UUID allowing easy generation and assignment for event sourced systems

  Sources   Download

MIT

The Requires

 

The Development Requires

by James Johnson

uuid event sourcing

03/08 2017

dev-1x

dev-1x https://github.com/excellentingenuity/UUID

UUID allowing easy generation and assignment for event sourced systems

  Sources   Download

MIT

The Requires

 

The Development Requires

by James Johnson

uuid event sourcing

03/08 2017

1.1.3

1.1.3.0 https://github.com/excellentingenuity/UUID

UUID allowing easy generation and assignment for event sourced systems

  Sources   Download

MIT

The Requires

 

The Development Requires

by James Johnson

uuid event sourcing

07/03 2017

dev-0.5.5-2

dev-0.5.5-2 https://github.com/excellentingenuity/UUID

UUID allowing easy generation and assignment for event sourced systems

  Sources   Download

MIT

The Requires

 

The Development Requires

by James Johnson

uuid event sourcing

07/03 2017

dev-5.5-compatibility

dev-5.5-compatibility https://github.com/excellentingenuity/UUID

UUID allowing easy generation and assignment for event sourced systems

  Sources   Download

MIT

The Requires

 

The Development Requires

by James Johnson

uuid event sourcing

23/11 2016

1.1.1

1.1.1.0 https://github.com/excellentingenuity/UUID

UUID allowing easy generation and assignment for event sourced systems

  Sources   Download

MIT

The Requires

 

The Development Requires

by James Johnson

uuid event sourcing

23/11 2016

1.1.2

1.1.2.0 https://github.com/excellentingenuity/UUID

UUID allowing easy generation and assignment for event sourced systems

  Sources   Download

MIT

The Requires

 

The Development Requires

by James Johnson

uuid event sourcing

23/11 2016

1.1.0

1.1.0.0 https://github.com/excellentingenuity/UUID

UUID allowing easy generation and assignment for event sourced systems

  Sources   Download

MIT

The Requires

 

The Development Requires

by James Johnson

uuid event sourcing

14/11 2016

1.0.0

1.0.0.0 https://github.com/excellentingenuity/UUID

UUID allowing easy generation and assignment for event sourced systems

  Sources   Download

MIT

The Requires

 

The Development Requires

by James Johnson

uuid event sourcing