1: <?php declare(strict_types=1);
2:
3: namespace Salient\Contract\Core;
4:
5: /**
6: * Has public constants with unique values of a given type
7: *
8: * @api
9: *
10: * @template TValue
11: */
12: interface EnumerationInterface
13: {
14: /**
15: * Get an array that maps public constant names to values
16: *
17: * @return array<string,TValue>
18: */
19: public static function cases(): array;
20:
21: /**
22: * Check if the class has a public constant with the given value
23: *
24: * @param TValue $value
25: */
26: public static function hasValue($value): bool;
27: }
28: