uptodown/equalable

检查相等对象的接口

v1.0.1 2017-11-30 13:43 UTC

This package is auto-updated.

Last update: 2024-09-29 03:10:24 UTC


README

检查相等对象的接口

Packagist MIT License

安装

使用composer安装

composer require uptodown/equalable

简单用法

对象

use Uptodown\EqualableInterface\Equalable;

class NewObject implements Equalable
{
    public function equals($object)
    {
        return /* equal condition */;
    }
}

使用方法

if ($newObject->equals($otherNewObject)) {
    // do something
}