PHPackages                             gabrielelana/precious - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. gabrielelana/precious

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gabrielelana/precious
=====================

Library to build value objects

0.1.0(6y ago)95283MITPHPPHP ~7.1CI failing

Since Oct 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/gabrielelana/precious)[ Packagist](https://packagist.org/packages/gabrielelana/precious)[ RSS](/packages/gabrielelana-precious/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (3)Used By (0)

Precious
========

[](#precious)

Library to build value objects.

Why
---

[](#why)

- A value object is **immutable**
- A value object should have a whell known set of attributes
- A value object is equal to another value object if they are **structurally equal** aka if they have the same attributes with the same values

In PHP there are no primitives to obtain this, what you can do is to have objects with private properties, getters and a lot of boilerplate code.

Usage
-----

[](#usage)

```
