src/snac/server/validation/validators/HasOperationValidator.php
/**
     * Validate a Source
     *
     * @param \snac\data\Source $source Source to validate
     * @param mixed[] $context optional Any context information needed for validation
     * @return boolean true if valid, false otherwise
     */
Validate a Source
@param \snac\data\Source $source Source to validate
@param mixed[] $context optional Any context information needed for validation
@return boolean true if valid, false otherwise
Validate a Source @param \ snac \ data \ Source $source Source to validate @param mixed [] $context optional Any context information needed for validation @return boolean true if valid false otherwise
public function validateSource($source, $context=null) {
        $success = $this->validateAbstractData($source, $context);
        if ($source && $languageObject = $source->getLanguage())
        {
            $languageSuccess = $this->validateLanguage($source->getLanguage(), $source->getOperation());
            $success = $success && $languageSuccess;
        }
        return $success;
    }
public function validateSource ( $ source , $ context = null ) { $ success = $ this -> validateAbstractData ( $ source , $ context ) ; if ( $ source && $ languageObject = $ source -> getLanguage ( ) ) { $ languageSuccess = $ this -> validateLanguage ( $ source -> getLanguage ( ) , $ source -> getOperation ( ) ) ; $ success = $ success && $ languageSuccess ; } return $ success ; }
Validate a Source
 @param \snac\data\Source $source Source to validate
 @param mixed[] $context optional Any context information needed for validation
 @return boolean true if valid, false otherwise
Validate a Source @param \ snac \ data \ Source $source Source to validate @param mixed [] $context optional Any context information needed for validation @return boolean true if valid false otherwise
/*
         * Source may be null, so work around that. I suspect we don't need to check that getLanguage()
         * returns anything because the validate* functions seem to deal with nulls just fine.
         */ /*
         * else success is simply the return value from validateAbstractData()
         */