src/snac/data/NameEntry.php
/**
     *
     * {@inheritDoc}
     *
     * @param \snac\data\NameEntry $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\NameEntry $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 \ NameEntry $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\NameEntry))
            return false;
        if (! parent::equals($other, $strict, $checkSubcomponents))
            return false;
        if ($this->getOriginal() != $other->getOriginal())
            return false;
        if ($this->getPreferenceScore() != $other->getPreferenceScore())
            return false;
        if (($this->getLanguage() != null && ! $this->getLanguage()->equals($other->getLanguage(), $strict, $checkSubcomponents)) ||
                 ($this->getLanguage() == null && $other->getLanguage() != null))
            return false;
        if ($checkSubcomponents) {
            if (!$this->checkArrayEqual($this->getComponents(), $other->getComponents(), $strict, $checkSubcomponents))
                return false;
            if (!$this->checkArrayEqual($this->getContributors(), $other->getContributors(), $strict, $checkSubcomponents))
                return false;
        }
        return true;
    }
public function equals ( $ other , $ strict = true , $ checkSubcomponents = true ) { if ( $ other == null || ! ( $ other instanceof \ snac \ data \ NameEntry ) ) return false ; if ( ! parent :: equals ( $ other , $ strict , $ checkSubcomponents ) ) return false ; if ( $ this -> getOriginal ( ) != $ other -> getOriginal ( ) ) return false ; if ( $ this -> getPreferenceScore ( ) != $ other -> getPreferenceScore ( ) ) return false ; if ( ( $ this -> getLanguage ( ) != null && ! $ this -> getLanguage ( ) -> equals ( $ other -> getLanguage ( ) , $ strict , $ checkSubcomponents ) ) || ( $ this -> getLanguage ( ) == null && $ other -> getLanguage ( ) != null ) ) return false ; if ( $ checkSubcomponents ) { if ( ! $ this -> checkArrayEqual ( $ this -> getComponents ( ) , $ other -> getComponents ( ) , $ strict , $ checkSubcomponents ) ) return false ; if ( ! $ this -> checkArrayEqual ( $ this -> getContributors ( ) , $ other -> getContributors ( ) , $ strict , $ checkSubcomponents ) ) return false ; } return true ; }
{@inheritDoc}
 @param \snac\data\NameEntry $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 \ NameEntry $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