public static function filterLanguage($value)
    {
        $uri = self::getExistingLanguageUri($value);
        /** @noinspection NullPointerExceptionInspection */
        return $uri !== null
            ? $uri
            : self::singleton()->getLanguageByCode(DEFAULT_LANG)->getUri();
    }
public static function filterLanguage($value)
    {
        $uri = self::getExistingLanguageUri($value);
        /** @noinspection NullPointerExceptionInspection */
        return $uri !== null
            ? $uri
            : self::singleton()->getLanguageByCode(DEFAULT_LANG)->getUri();
    }
public static function filterLanguage ( $ value ) { $ uri = self :: getExistingLanguageUri ( $ value ) ; /** @noinspection NullPointerExceptionInspection */ return $ uri !== null ? $ uri : self :: singleton ( ) -> getLanguageByCode ( DEFAULT_LANG ) -> getUri ( ) ; }
Filter a value of a language to transform it into uri

If it's an uri, returns it
If it's a language code returns the associated uri
Else returns the default language uri

@param $value
@return string
@throws common_exception_Error
Filter a value of a language to transform it into uri