src/snac/server/validation/validators/IDValidator.php
/**
     * Validate a language
     *
     * @param \snac\data\Language $lang Language to validate
     * @param mixed[] $context optional Any context information needed for validation
     * @return boolean true if valid, false otherwise
     */
Validate a language
@param \snac\data\Language $lang Language to validate
@param mixed[] $context optional Any context information needed for validation
@return boolean true if valid, false otherwise
Validate a language @param \ snac \ data \ Language $lang Language to validate @param mixed [] $context optional Any context information needed for validation @return boolean true if valid false otherwise
public function validateLanguage($lang, $context=null) {
        $preID = "";
        $list = $this->constellation->getLanguagesUsed();
        if ($context != null) {
            $list = array($context->getLanguage());
            $preID = $context->getID() . ":";
        }
        return $this->validateGeneric($lang, $list, "lang", $preID);
    }
public function validateLanguage ( $ lang , $ context = null ) { $ preID = " " ; $ list = $ this -> constellation -> getLanguagesUsed ( ) ; if ( $ context != null ) { $ list = array ( $ context -> getLanguage ( ) ) ; $ preID = $ context -> getID ( ) . " : " ; } return $ this -> validateGeneric ( $ lang , $ list , " lang " , $ preID ) ; }
Validate a language
 @param \snac\data\Language $lang Language to validate
 @param mixed[] $context optional Any context information needed for validation
 @return boolean true if valid, false otherwise
Validate a language @param \ snac \ data \ Language $lang Language to validate @param mixed [] $context optional Any context information needed for validation @return boolean true if valid false otherwise
// Get languages from the constellation // If there is a context, use that (in list form) instead, and add pre-id