2017 © Pedro PelĂĄez
 

library value-objects

Collection of PHP value objects to use and extend as building blocks for DDD.

image

jgimeno/value-objects

Collection of PHP value objects to use and extend as building blocks for DDD.

  • Monday, February 27, 2017
  • by jgimeno
  • Repository
  • 0 Watchers
  • 1 Stars
  • 86 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 3 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Build Status Coverage Status Code Climate, (*1)

Ultimate PHP Value Object Collection

Collection of PHP value objects to use and extend as building blocks for DDD., (*2)

This library comes with the idea of having a starting point for defining value objects for different projects., (*3)

All the value objects are inmutable., (*4)

How to install

You can get it using composer:, (*5)

composer require jgimeno/value-objects

How to use

Base objects

The idea of this library is to have a collection of objects as a base for the creation of your Domain., (*6)

The most basic object is the ValueObject which we can extend all the value objects we want to create from. Base ValueObject implements __toString() and equals() methods (i.e. you get them for free)., (*7)

If we know that our value objects will benefit from the methods included in the objects Strings, Number or Boolean, we can extend from there., (*8)

Rationale

Imagine that I create an object called SonName that our domain needs. In that case it could be useful to extend from Strings and we will have methods like toUpperCase(), trim(), etc that we can reuse. You get the idea., (*9)

Lastly there is another base object called Identifier. This is useful when creating ids, for example, a UserId can extend from Identifier. Then we can do UserId::generate() and we will have a unique userId generated using UUIDs., (*10)

Useful objects

Internet\Email: Object representing an email address, it throws exceptions when given email is not a valid email., (*11)

Internet\IpAddress: Object that represents an IP address, it throws exception when is not a valid ip address., (*12)

The Versions

27/02 2017

dev-release

dev-release

Collection of PHP value objects to use and extend as building blocks for DDD.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniel SantamarĂ­a
by Jonathan Gimeno AlarcĂłn
by RaĂșl Araya Tauler
by Daniel Esteban GonzĂĄlez

value value object value objects identifiers

23/02 2017

dev-master

9999999-dev

Collection of PHP value objects to use and extend as building blocks for DDD.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniel SantamarĂ­a
by Jonathan Gimeno AlarcĂłn
by RaĂșl Araya Tauler
by Daniel Esteban GonzĂĄlez

value value object value objects identifiers

23/02 2017

0.3.0

0.3.0.0

Collection of PHP value objects to use and extend as building blocks for DDD.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniel SantamarĂ­a
by Jonathan Gimeno AlarcĂłn
by RaĂșl Araya Tauler
by Daniel Esteban GonzĂĄlez

value value object value objects identifiers

21/02 2017

0.2.0

0.2.0.0

Collection of PHP value objects to use and extend as building blocks for DDD.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Gimeno AlarcĂłn
by RaĂșl Araya Tauler

value value object value objects identifiers

15/02 2017

0.1.2

0.1.2.0

Collection of PHP value objects to use and extend as building blocks for DDD.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Gimeno AlarcĂłn

value value object value objects identifiers

14/02 2017

0.1.1

0.1.1.0

Collection of PHP value objects to use and extend as building blocks for DDD.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Gimeno AlarcĂłn

value value object value objects identifiers

14/02 2017

0.1.0

0.1.0.0

Collection of PHP value objects to use and extend as building blocks for DDD.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Gimeno AlarcĂłn

value value object value objects identifiers