ZEROSPAM\Framework\SDK\Utils\Contracts\Enums\EnumToStringLowerTrait
Trait EnumToStringLowerTrait
Common code for Enum Insensitive implementations
Synopsis
trait EnumToStringLowerTrait
{
- // methods
- public string __toString()
- public static EnumToStringLowerTrait byNameInsensitive()
- public static EnumToStringLowerTrait byValueInsensitive()
- public static string getDisplayableValues()
- public static array getEnumsByNameInsensitive()
Methods
public
- __toString()
- byNameInsensitive() — Retrieve enumeration instance by name, case insensitive
- byValueInsensitive() — Retrieve enumeration instance by its value, case insensitive
- getDisplayableValues() — String representing the different values of enumeration
- getEnumsByNameInsensitive() — Return an array of enum matching all the given names
History
-
2018-08-14T15:21:39+00:00 (commit #4c5bd8f)
Author: Philippe Bouchard-Bourdeau (pbb@zerospam.ca) / Commiter: Philippe Bouchard-Bourdeau (pbb@zerospam.ca)
fix(Enums): Adjusted return type Improved documentation
-
2018-08-14T15:01:30+00:00 (commit #dfab545)
Author: Philippe Bouchard-Bourdeau (pbb@zerospam.ca) / Commiter: Philippe Bouchard-Bourdeau (pbb@zerospam.ca)
fix(Enums): Removed return type enforcement Return type enforcement in contract and trait would prevent type return enforcement in implementation
-
2018-08-14T14:15:20+00:00 (commit #095f6e3)
Author: Philippe Bouchard-Bourdeau (pbb@zerospam.ca) / Commiter: Philippe Bouchard-Bourdeau (pbb@zerospam.ca)
feat(Enums): Added Enums Insensitive contract Added Contract and tests for enums insensitive