src/snac/server/validation/validators/ResourceValidator.php
/**
     * Validate a Resource Relation
     *
     * @param \snac\data\ResourceRelation $relation ResourceRelation to validate
     * @param mixed[] $context optional Any context information needed for validation
     * @return boolean true if valid, false otherwise
     */
Validate a Resource Relation
@param \snac\data\ResourceRelation $relation ResourceRelation to validate
@param mixed[] $context optional Any context information needed for validation
@return boolean true if valid, false otherwise
Validate a Resource Relation @param \ snac \ data \ ResourceRelation $relation ResourceRelation to validate @param mixed [] $context optional Any context information needed for validation @return boolean true if valid false otherwise
public function validateResourceRelation($relation, $context=null) {
        if ($relation == null)
            return true;
        if ($relation->getResource() == null) {
            $this->addError("Missing resource object", $relation);
            return false;
        }
        $resource = $relation->getResource();
        if ($resource->getID() == null) {
            $this->addError("Resource missing ID or version", $relation);
            return false;
        }
        return true;
    }
public function validateResourceRelation ( $ relation , $ context = null ) { if ( $ relation == null ) return true ; if ( $ relation -> getResource ( ) == null ) { $ this -> addError ( " Missing resource object " , $ relation ) ; return false ; } $ resource = $ relation -> getResource ( ) ; if ( $ resource -> getID ( ) == null ) { $ this -> addError ( " Resource missing ID or version " , $ relation ) ; return false ; } return true ; }
Validate a Resource Relation
 @param \snac\data\ResourceRelation $relation ResourceRelation to validate
 @param mixed[] $context optional Any context information needed for validation
 @return boolean true if valid, false otherwise
Validate a Resource Relation @param \ snac \ data \ ResourceRelation $relation ResourceRelation to validate @param mixed [] $context optional Any context information needed for validation @return boolean true if valid false otherwise