src/snac/data/SNACControlMetadata.php
/**
     *
     * {@inheritDoc}
     *
     * @param \snac\data\SNACControlMetadata $other Other object
     * @param boolean $strict optional Whether or not to check id, version, and operation
     * @param boolean $checkSubcomponents optional Whether or not to check SNACControlMetadata, nameEntries contributors & components
     * @return boolean true on equality, false otherwise
     *
     * @see \snac\data\AbstractData::equals()
     */
@param \snac\data\SNACControlMetadata $other Other object
@param boolean $strict optional Whether or not to check id, version, and operation
@param boolean $checkSubcomponents optional Whether or not to check SNACControlMetadata, nameEntries contributors & components
@return boolean true on equality, false otherwise


@param \ snac \ data \ SNACControlMetadata $other Other object @param boolean $strict optional Whether or not to check id version and operation @param boolean $checkSubcomponents optional Whether or not to check SNACControlMetadata nameEntries contributors & components @return boolean true on equality false otherwise
public function equals($other, $strict = true, $checkSubcomponents = true) {
        if ($other == null || ! ($other instanceof \snac\data\SNACControlMetadata))
            return false;
        if (! parent::equals($other, $strict, $checkSubcomponents))
            return false;
        if ($this->getSubCitation() != $other->getSubCitation())
            return false;
        if ($this->getSourceData() != $other->getSourceData())
            return false;
        if ($this->getNote() != $other->getNote())
            return false;
        if (($this->getCitation() !== null && $other->getCitation() === null) ||
            ($this->getCitation() === null && $other->getCitation() !== null) ||
            ($this->getCitation() !== null && $other->getCitation() !== null && $this->getCitation()->getID() !== $other->getCitation()->getID()))
            return false;
        if (($this->getDescriptiveRule() != null && ! $this->getDescriptiveRule()->equals($other->getDescriptiveRule())) ||
                 ($this->getDescriptiveRule() == null && $other->getDescriptiveRule() != null))
            return false;
        if (($this->getLanguage() != null && ! $this->getLanguage()->equals($other->getLanguage(), $strict, $checkSubcomponents)) ||
                 ($this->getLanguage() == null && $other->getLanguage() != null))
            return false;
        return true;
    }
public function equals ( $ other , $ strict = true , $ checkSubcomponents = true ) { if ( $ other == null || ! ( $ other instanceof \ snac \ data \ SNACControlMetadata ) ) return false ; if ( ! parent :: equals ( $ other , $ strict , $ checkSubcomponents ) ) return false ; if ( $ this -> getSubCitation ( ) != $ other -> getSubCitation ( ) ) return false ; if ( $ this -> getSourceData ( ) != $ other -> getSourceData ( ) ) return false ; if ( $ this -> getNote ( ) != $ other -> getNote ( ) ) return false ; if ( ( $ this -> getCitation ( ) !== null && $ other -> getCitation ( ) === null ) || ( $ this -> getCitation ( ) === null && $ other -> getCitation ( ) !== null ) || ( $ this -> getCitation ( ) !== null && $ other -> getCitation ( ) !== null && $ this -> getCitation ( ) -> getID ( ) !== $ other -> getCitation ( ) -> getID ( ) ) ) return false ; if ( ( $ this -> getDescriptiveRule ( ) != null && ! $ this -> getDescriptiveRule ( ) -> equals ( $ other -> getDescriptiveRule ( ) ) ) || ( $ this -> getDescriptiveRule ( ) == null && $ other -> getDescriptiveRule ( ) != null ) ) return false ; if ( ( $ this -> getLanguage ( ) != null && ! $ this -> getLanguage ( ) -> equals ( $ other -> getLanguage ( ) , $ strict , $ checkSubcomponents ) ) || ( $ this -> getLanguage ( ) == null && $ other -> getLanguage ( ) != null ) ) return false ; return true ; }
{@inheritDoc}
 @param \snac\data\SNACControlMetadata $other Other object
 @param boolean $strict optional Whether or not to check id, version, and operation
 @param boolean $checkSubcomponents optional Whether or not to check SNACControlMetadata, nameEntries contributors & components
 @return boolean true on equality, false otherwise
{ @inheritDoc } @param \ snac \ data \ SNACControlMetadata $other Other object @param boolean $strict optional Whether or not to check id version and operation @param boolean $checkSubcomponents optional Whether or not to check SNACControlMetadata nameEntries contributors & components @return boolean true on equality false otherwise
// Citations are special. They are Source objects, but they may not be completely filled in.  In fact, the only thing we may know // about them within an SCM is their ID.  So, for equality, we may only check ID.