PHPackages                             recruiterphp/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. recruiterphp/precious

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

recruiterphp/precious
=====================

Library to build value objects

v0.2.0(9mo ago)00MITPHPPHP ^8.4CI passing

Since Aug 2Pushed 9mo agoCompare

[ Source](https://github.com/recruiterphp/precious)[ Packagist](https://packagist.org/packages/recruiterphp/precious)[ RSS](/packages/recruiterphp-precious/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)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)

```
