Ejemplo n.º 1
0
 /**
  * Check whether attribute is semantically equal to other.
  *
  * @param AttributeTypeAndValue $other Object to compare to
  * @return bool
  */
 public function equals(AttributeTypeAndValue $other)
 {
     // check that attribute types match
     if ($this->oid() !== $other->oid()) {
         return false;
     }
     $matcher = $this->_value->equalityMatchingRule();
     $result = $matcher->compare($this->_value->stringValue(), $other->_value->stringValue());
     // match
     if ($result) {
         return true;
     }
     // no match or Undefined
     return false;
 }