2017 © Pedro Peláez
 

library uuidserviceprovider

image

germania-kg/uuidserviceprovider

  • Thursday, June 14, 2018
  • by germania-kg
  • Repository
  • 2 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 50 % Grown

The README.md

Germania KG · UuidServiceProvider

Pimple Service Provider for working with Ben Ramsey's ramsey/uuid package, (*1)

Packagist PHP version Build Status Scrutinizer Code Quality Code Coverage Build Status, (*2)

Installation with Composer

$ composer require germania-kg/uuidserviceprovider

Setup

<?php
use Germania\UuidServiceProvider\UuidServiceProvider;

// A. Use with Slim or Pimple
$app = new \Slim\App;
$dic = $app->getContainer();
$dic = new Pimple\Container;

// B. Register Service Provider.
$dic->register( new UuidServiceProvider  );

Services

UUID.new

Factory: Returns a new version 4 (random) UUID object as Ramsey\Uuid\Uuid instance., (*3)

<?php
$uuid4 = $dic['UUID.new'];

UUID.new.hex

Returns the hex string representation of a UUID.new object., (*4)

<?php
$uuid4_hex = $dic['UUID.new.hex'];

UUID.Factory

Returns a callable that returns UUID object as Ramsey\Uuid\Uuid instance., (*5)

<?php
$factory = $dic['UUID.Factory'];
$uuid4 = $factory();

UUID.HexFactory

Returns a callable that returns the hex string representation of a UUID.new object., (*6)

<?php
$factory = $dic['UUID.HexFactory'];
$uuid4_hex = $factory();

Development

$ git clone https://github.com/GermaniaKG/UuidServiceProvider.git
$ cd UuidServiceProvider
$ composer install

Unit tests

Either copy phpunit.xml.dist to phpunit.xml and adapt to your needs, or leave as is. Run PhpUnit test or composer scripts like this:, (*7)

$ composer test
# or
$ vendor/bin/phpunit

The Versions

14/06 2018

dev-develop

dev-develop

  Sources   Download

proprietary

The Requires

 

The Development Requires

by Carsten Witt

14/06 2018

dev-master

9999999-dev

  Sources   Download

proprietary

The Requires

 

The Development Requires

by Carsten Witt

14/06 2018

1.1.0

1.1.0.0

  Sources   Download

proprietary

The Requires

 

The Development Requires

by Carsten Witt

08/02 2018

1.0.0

1.0.0.0

  Sources   Download

proprietary

The Requires

 

The Development Requires

by Carsten Witt