Add enum for process types in the museum

This commit is contained in:
2022-10-15 23:21:23 +02:00
parent cc1a23c2fd
commit 42a02c186a
4 changed files with 170 additions and 2 deletions

View File

@ -0,0 +1,58 @@
<?PHP
/**
* Describes an interface for a fully implemented enum describing a
* list of controlled values at md. Expects the availabiliy of
* translations for each.
*
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
*/
declare(strict_types = 1);
/**
* Describes an interface for a fully implemented enum describing a
* list of controlled values at md.
*/
interface MDValueEnumInterface {
/**
* Returns a value of this type based on a string.
*
* @param string $input Input to get a value from.
*
* @return MDValueEnumInterface
*/
public static function fromString(string $input):MDValueEnumInterface;
/**
* Lists the case names available.
*
* @return array<string>
*/
public static function caseNames():array;
/**
* Gets an unsorted array based on provided keys and their translations.
*
* @param MDTlLoader $tlLoader Translation loader.
*
* @return array<string>
*/
public static function getUnsortedList(MDTlLoader $tlLoader):array;
/**
* Gets a list of entries in a translated version.
*
* @param MDTlLoader $tlLoader Translation loader.
*
* @return array<string>
*/
public static function getSortedList(MDTlLoader $tlLoader):array;
/**
* Returns the name of the current value in translation.
*
* @param MDTlLoader $tlLoader Translation loader.
*
* @return string
*/
public function getTledName(MDTlLoader $tlLoader):string;
}