first commit
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
namespace WorkbloomERP\Constants;
|
||||
|
||||
class BrasilUfsConst {
|
||||
public const UFS = [
|
||||
'AC' => 'Acre',
|
||||
'AL' => 'Alagoas',
|
||||
'AP' => 'Amapá',
|
||||
'AM' => 'Amazonas',
|
||||
'BA' => 'Bahia',
|
||||
'CE' => 'Ceará',
|
||||
'DF' => 'Distrito Federal',
|
||||
'ES' => 'Espírito Santo',
|
||||
'EX' => 'Estrangeiro',
|
||||
'GO' => 'Goiás',
|
||||
'MA' => 'Maranhão',
|
||||
'MT' => 'Mato Grosso',
|
||||
'MS' => 'Mato Grosso do Sul',
|
||||
'MG' => 'Minas Gerais',
|
||||
'PA' => 'Pará',
|
||||
'PB' => 'Paraíba',
|
||||
'PR' => 'Paraná',
|
||||
'PE' => 'Pernambuco',
|
||||
'PI' => 'Piauí',
|
||||
'RJ' => 'Rio de Janeiro',
|
||||
'RN' => 'Rio Grande do Norte',
|
||||
'RS' => 'Rio Grande do Sul',
|
||||
'RO' => 'Rondônia',
|
||||
'RR' => 'Roraima',
|
||||
'SC' => 'Santa Catarina',
|
||||
'SP' => 'São Paulo',
|
||||
'SE' => 'Sergipe',
|
||||
'TO' => 'Tocantins'
|
||||
];
|
||||
|
||||
public static function getAll(): array {
|
||||
return self::UFS;
|
||||
}
|
||||
|
||||
public static function exists(string $uf): bool {
|
||||
return isset(self::UFS[strtoupper($uf)]);
|
||||
}
|
||||
|
||||
public static function getName(string $uf): ?string {
|
||||
return self::UFS[strtoupper($uf)] ?? null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user