myks92/php-value-objects

A PHP library Value Object

1.1.0 2020-07-29 11:08 UTC

This package is auto-updated.

Last update: 2024-11-29 06:03:50 UTC


README

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

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.