Fix bug in and add validity check in MDObjectSyndicationSet
This commit is contained in:
parent
c4ac0f0fb4
commit
3ea3a9f2c0
|
@ -39,7 +39,7 @@ final class MDObjectSyndicationSet extends MDValueSet {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSearchUrlForObject(string $repo, string $instId, string $search_value):string {
|
||||
public static function getSearchUrlForObject(string $repo, string $instId, string $search_value):string {
|
||||
|
||||
switch ($repo) {
|
||||
case 'ddb':
|
||||
|
@ -50,6 +50,22 @@ final class MDObjectSyndicationSet extends MDValueSet {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Function for checking the availability of a provided repository in the
|
||||
* list of known repositories.
|
||||
*
|
||||
* @param string $repo Repository name to check.
|
||||
*
|
||||
* @return string|boolean
|
||||
*/
|
||||
final public static function checkRepositoryIsKnown(string $repo) {
|
||||
if (isset(self::REPOSITORIES[$repo])) {
|
||||
return self::REPOSITORIES[$repo];
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a sorted list of the entries in a translated version.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user