joshdifabio / value
v0.1.0
2019-04-27 11:31 UTC
Requires
- php: >=7.1
This package is auto-updated.
Last update: 2024-11-27 23:48:05 UTC
README
An interface for immutable value classes for PHP7.1+
Value objects are one of the fundamental building blocks of modern software. However, value objects in PHP lack a common interface, making it impossible to create useful generic solutions to a range of problems, especially data structures.
This package provides a simple Value
interface with two methods: equals()
and hashCode()
. Also provided are a number of helper functions, such as
equal()
, hash()
and hashValues()
, which make it easy for you to implement
your own Value
classes with minimal effort.
See also
AutoValue PHP: Generated immutable value classes for PHP7.1+