Skip to content

A set of PHP Value Objects to manage composite values

License

Notifications You must be signed in to change notification settings

Myks92/php-value-objects

Repository files navigation

PHP Value Objects

Packagist Version Total Downloads Software License PHP Version Total Downloads composer.lock

Branch Travis
master Build Status

A set of PHP Value Objects to manage simple and composite values.

What are Value Objects

Value Objects are PHP objects that represent and manage simple or complex values. Once set, the value object cannot be modified without changing its identity.

Simple value objects represent a simple value, like an email. Complex value objects represent complex values, that, in order to really represent a value, need more than one value, like a price that needs an amount and a currency to be understandable and have a sense.

PHP supports several value object e.g.: the DateTime object and DateTimeImmutable object.

This library gives support for other kind of values.

Installation

To install, use composer:

composer require myks92/php-value-objects

Documentation

All use instructions are located in documentation.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see LICENSE for more information.