22declare(strict_types=1);
26use
function mb_strtolower;
28enum PluginEnableOrder{
32 public static function fromString(
string $name) : ?self{
37 static $aliasMap = null;
39 if($aliasMap ===
null){
41 foreach(self::cases() as $case){
42 foreach($case->getAliases() as $alias){
43 $aliasMap[$alias] = $case;
47 return $aliasMap[mb_strtolower($name)] ??
null;
54 public function getAliases() : array{
56 self::STARTUP => [
"startup"],
57 self::POSTWORLD => [
"postworld"]