src/snac/server/validation/validators/IDValidator.php
/**
     * Check whether IDs persist down SCM
     *
     * @param \snac\data\AbstractData $object
     * @return boolean
     */
Check whether IDs persist down SCM
@param \snac\data\AbstractData $object
@return boolean
Check whether IDs persist down SCM @param \ snac \ data \ AbstractData $object @return boolean
private function checkSCM($object) {
        $success = true;
        foreach ($object->getSNACControlMetadata() as $scm) {
            if ($scm != null && $scm->getID() != null) {
                $this->addError("Object with no ID has SNACControlMetadata with ID", $object);
                $success = false;
            } else if ($scm != null && $scm->getID() == null &&
                    ($scm->getLanguage() != null && $scm->getLanguage()->getID() != null)) {
                $this->addError("Object with no ID has SNACControlMetadata with no ID with subelements that have ID", $object);
                $success = false;
            }
        }
        return $success;
    }
private function checkSCM ( $ object ) { $ success = true ; foreach ( $ object -> getSNACControlMetadata ( ) as $ scm ) { if ( $ scm != null && $ scm -> getID ( ) != null ) { $ this -> addError ( " Object with no ID has SNACControlMetadata with ID " , $ object ) ; $ success = false ; } else if ( $ scm != null && $ scm -> getID ( ) == null && ( $ scm -> getLanguage ( ) != null && $ scm -> getLanguage ( ) -> getID ( ) != null ) ) { $ this -> addError ( " Object with no ID has SNACControlMetadata with no ID with subelements that have ID " , $ object ) ; $ success = false ; } } return $ success ; }
Check whether IDs persist down SCM
 @param \snac\data\AbstractData $object
 @return boolean
Check whether IDs persist down SCM @param \ snac \ data \ AbstractData $object @return boolean