uptodown / equalable
An interface for checking equal objects
v1.0.1
2017-11-30 13:43 UTC
Requires
- php: >=5.4.0
This package is auto-updated.
Last update: 2024-04-29 02:21:47 UTC
README
An interface for checking equal objects
Installation
To install it with composer:
composer require uptodown/equalable
Simple usage
The object:
use Uptodown\EqualableInterface\Equalable;
class NewObject implements Equalable
{
public function equals($object)
{
return /* equal condition */;
}
}
The usage:
if ($newObject->equals($otherNewObject)) {
// do something
}