Add enum for process types in the museum
This commit is contained in:
58
src/enums/MDValueEnumInterface.php
Normal file
58
src/enums/MDValueEnumInterface.php
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user