3 Nov 2010 14:25
Re: Proposal for a UUID package
Michael Gauthier <mike <at> silverorange.com>
2010-11-03 13:25:55 GMT
2010-11-03 13:25:55 GMT
On Fri, 2010-10-29 at 17:59 +0200, Mathieu Bruyen wrote: > Hello all, Hi Mathieu, > I started to make some code about a package for generating UUIDs that > I would like to publish in PEAR and I have some question about that. > > I know that there is a PECL package doing that ( > http://pecl.php.net/package/uuid ) but here I propose a pure php-sided > package. I know that in some way the php uniquid() function do the > trick, but I propose to completely follow the RFC. > My first question is: is it of interest? > There's no harm in starting a proposal. I, for one, think it's a good idea and would make a good PEAR package. This sounds like a good proposal for PEAR. > In more details my proposal consists of: > * An interface representing a Uuid. There are methods to get it as > string, URN and raw (big)int because it is database friendly. This > interface is implemented by different classes for the different > variants. Right now I only plan to do the variant in RFC4122. > * An interface for a Uuid generator. It has two methods: creating a > new Uuid and getting the variant of generated Uuids. There is one > extending abstract class for the variant given in the RFC, which is > itself declined into one abstract class for each Uuid version. These > ones are defined because they expose an algorithm to subclasses (for > example for version 1: getLock, getNodeId, getClockSequence, ...). > Finally we have the real classes implementing the algorithms. Right(Continue reading)
Mike mentioned the preliminary things, let us know when they are done so we
can review more?
--
RSS Feed