ObjectIdentityInterface::equals()

bool equals(ObjectIdentityInterface $identity)

We specifically require this method so we can check for object equality explicitly, and do not have to rely on referencial equality instead.

Though in most cases, both checks should result in the same outcome.

Referential Equality: $object1 === $object2 Example for Object Equality: $object1->getId() === $object2->getId()

Parameters

ObjectIdentityInterface $identity

Return Value

bool
doc_Symfony
2016-10-28 06:25:06
Comments
Leave a Comment

Please login to continue.