src/snac/data/AbstractData.php
/**
     * Is Equal
     *
     * This function tests whether the current object is equal to the parameter.  They
     * must match exactly.  It allows for a parameter to enable skipping of the ID/version/operation
     * matching.
     *
     * @param \snac\data\AbstractData $other The other object to compare
     * @param boolean $strict optional Whether to disable strict checking (skip id)
     * @param boolean $checkSubcomponents optional Whether or not to check SNACControlMetadata, nameEntries contributors & components
     * @return boolean true if equal, false if not
     */


@param \snac\data\AbstractData $other The other object to compare
@param boolean $strict optional Whether to disable strict checking (skip id)
@param boolean $checkSubcomponents optional Whether or not to check SNACControlMetadata, nameEntries contributors & components
@return boolean true if equal, false if not
@param \ snac \ data \ AbstractData $other The other object to compare @param boolean $strict optional Whether to disable strict checking ( skip id ) @param boolean $checkSubcomponents optional Whether or not to check SNACControlMetadata nameEntries contributors & components @return boolean true if equal false if not
public function equals($other, $strict = true, $checkSubcomponents = true) {
        if ($other == null || !($other instanceOf \snac\data\AbstractData))
            return false;
        if ($strict) {
            if ($this->getID() != $other->getID())
                return false;
            if ($this->getVersion() != $other->getVersion())
                return false;
            if ($this->getOperation() != $other->getOperation())
                return false;
        }
        if ($this->getMaxDateCount() != $other->getMaxDateCount())
            return false;
        if ($this->getMaxDateCount() > 0) {
            $tmp = array();
            if (!$this->checkArrayEqual($this->getDateList(), $other->getDateList(), $strict, $checkSubcomponents))
                return false;
        }
        if ($checkSubcomponents && !$this->checkArrayEqual($this->getSNACControlMetadata(), $other->getSNACControlMetadata(), $strict, $checkSubcomponents))
            return false;
        return true;
    }
public function equals ( $ other , $ strict = true , $ checkSubcomponents = true ) { if ( $ other == null || ! ( $ other instanceOf \ snac \ data \ AbstractData ) ) return false ; if ( $ strict ) { if ( $ this -> getID ( ) != $ other -> getID ( ) ) return false ; if ( $ this -> getVersion ( ) != $ other -> getVersion ( ) ) return false ; if ( $ this -> getOperation ( ) != $ other -> getOperation ( ) ) return false ; } if ( $ this -> getMaxDateCount ( ) != $ other -> getMaxDateCount ( ) ) return false ; if ( $ this -> getMaxDateCount ( ) > 0 ) { $ tmp = array ( ) ; if ( ! $ this -> checkArrayEqual ( $ this -> getDateList ( ) , $ other -> getDateList ( ) , $ strict , $ checkSubcomponents ) ) return false ; } if ( $ checkSubcomponents && ! $ this -> checkArrayEqual ( $ this -> getSNACControlMetadata ( ) , $ other -> getSNACControlMetadata ( ) , $ strict , $ checkSubcomponents ) ) return false ; return true ; }
Is Equal
 This function tests whether the current object is equal to the parameter.
Is Equal This function tests whether the current object is equal to the parameter .
// If all the tests pass, they are equal