src/snac/data/SNACDate.php
/**
     *
     * {@inheritDoc}
     *
     * @param \snac\data\SNACDate $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\SNACDate $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 \ SNACDate $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\SNACDate))
            return false;
        if (! parent::equals($other, $strict, $checkSubcomponents))
            return false;
        if ($this->getFromBC() != $other->getFromBC())
            return false;
        if ($this->getFromDate() != $other->getFromDate())
            return false;
        if ($this->getFromDateOriginal() != $other->getFromDateOriginal())
            return false;
        if ($this->getToBC() != $other->getToBC())
            return false;
        if ($this->getToDate() != $other->getToDate())
            return false;
        if ($this->getToDateOriginal() != $other->getToDateOriginal())
            return false;
        if ($this->getIsRange() != $other->getIsRange())
            return false;
        if ($this->getNote() != $other->getNote())
            return false;
        if ($this->getFromRange() != null && $other->getFromRange() != null) {
            if ($this->getFromRange()["notAfter"] != $other->getFromRange()["notAfter"] ||
                    $this->getFromRange()["notBefore"] != $other->getFromRange()["notBefore"])
                return false;
        } else if (($this->getFromRange() == null && $other->getFromRange() != null) ||
           ($this->getFromRange() != null && $other->getFromRange() == null)) {
            return false;
        }
        if ($this->getToRange() != null && $other->getToRange() != null) {
            if ($this->getToRange()["notAfter"] != $other->getToRange()["notAfter"] ||
                    $this->getToRange()["notBefore"] != $other->getToRange()["notBefore"])
                return false;
        } else if (($this->getToRange() == null && $other->getToRange() != null) ||
                ($this->getToRange() != null && $other->getToRange() == null)) {
            return false;
        }
        if (($this->getFromType() != null && ! $this->getFromType()->equals($other->getFromType())) ||
                 ($this->getFromType() == null && $other->getFromType() != null))
            return false;
        if (($this->getToType() != null && ! $this->getToType()->equals($other->getToType())) ||
                 ($this->getToType() == null && $other->getToType() != null))
            return false;
        return true;
    }
public function equals ( $ other , $ strict = true , $ checkSubcomponents = true ) { if ( $ other == null || ! ( $ other instanceof \ snac \ data \ SNACDate ) ) return false ; if ( ! parent :: equals ( $ other , $ strict , $ checkSubcomponents ) ) return false ; if ( $ this -> getFromBC ( ) != $ other -> getFromBC ( ) ) return false ; if ( $ this -> getFromDate ( ) != $ other -> getFromDate ( ) ) return false ; if ( $ this -> getFromDateOriginal ( ) != $ other -> getFromDateOriginal ( ) ) return false ; if ( $ this -> getToBC ( ) != $ other -> getToBC ( ) ) return false ; if ( $ this -> getToDate ( ) != $ other -> getToDate ( ) ) return false ; if ( $ this -> getToDateOriginal ( ) != $ other -> getToDateOriginal ( ) ) return false ; if ( $ this -> getIsRange ( ) != $ other -> getIsRange ( ) ) return false ; if ( $ this -> getNote ( ) != $ other -> getNote ( ) ) return false ; if ( $ this -> getFromRange ( ) != null && $ other -> getFromRange ( ) != null ) { if ( $ this -> getFromRange ( ) [ " notAfter " ] != $ other -> getFromRange ( ) [ " notAfter " ] || $ this -> getFromRange ( ) [ " notBefore " ] != $ other -> getFromRange ( ) [ " notBefore " ] ) return false ; } else if ( ( $ this -> getFromRange ( ) == null && $ other -> getFromRange ( ) != null ) || ( $ this -> getFromRange ( ) != null && $ other -> getFromRange ( ) == null ) ) { return false ; } if ( $ this -> getToRange ( ) != null && $ other -> getToRange ( ) != null ) { if ( $ this -> getToRange ( ) [ " notAfter " ] != $ other -> getToRange ( ) [ " notAfter " ] || $ this -> getToRange ( ) [ " notBefore " ] != $ other -> getToRange ( ) [ " notBefore " ] ) return false ; } else if ( ( $ this -> getToRange ( ) == null && $ other -> getToRange ( ) != null ) || ( $ this -> getToRange ( ) != null && $ other -> getToRange ( ) == null ) ) { return false ; } if ( ( $ this -> getFromType ( ) != null && ! $ this -> getFromType ( ) -> equals ( $ other -> getFromType ( ) ) ) || ( $ this -> getFromType ( ) == null && $ other -> getFromType ( ) != null ) ) return false ; if ( ( $ this -> getToType ( ) != null && ! $ this -> getToType ( ) -> equals ( $ other -> getToType ( ) ) ) || ( $ this -> getToType ( ) == null && $ other -> getToType ( ) != null ) ) return false ; return true ; }
{@inheritDoc}
 @param \snac\data\SNACDate $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 \ SNACDate $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
// handle ranges