From c907c1b0857aa1aafb7fb51c6890b960bb542911 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Thu, 23 May 2024 00:35:57 +0200 Subject: [PATCH] Add function for loading collection areas from array --- src/enums/MDInstitutionCollectionArea.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/enums/MDInstitutionCollectionArea.php b/src/enums/MDInstitutionCollectionArea.php index 6f37a54..655a6b8 100644 --- a/src/enums/MDInstitutionCollectionArea.php +++ b/src/enums/MDInstitutionCollectionArea.php @@ -77,6 +77,23 @@ enum MDInstitutionCollectionArea implements MDValueEnumInterface, JsonSerializab } + /** + * Returns instances of MDInstitutionCollectionArea based on list of strings. + * + * @param list $input Input to get a value from. + * + * @return list + */ + public static function fromStrings(array $input):array { + + $output = []; + foreach ($input as $value) { + $output[] = self::fromString($value); + } + return $output; + + } + /** * Returns a value of this type based on an integer. *