File manager - Edit - /var/www/html/portal/app/Enums/GendersCurriculo.php
Back
<?php namespace App\Enums; enum GendersCurriculo: int { case MASCULINO = 1; case FEMININO = 2; case OUTRO = 3; public function label(): string { return match ($this) { self::MASCULINO => 'Masculino', self::FEMININO => 'Feminino', self::OUTRO => 'Outro', }; } public static function fromLabel(string $label): ?self { return match (strtolower($label)) { 'masculino' => self::MASCULINO, 'feminino' => self::FEMININO, 'outro' => self::OUTRO, default => null, }; } public static function options(): array { return [ self::MASCULINO->value => 'Masculino', self::FEMININO->value => 'Feminino', self::OUTRO->value => 'Outro', ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.22 |
proxy
|
phpinfo
|
Settings