-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bfe124a
commit 3c2fcfa
Showing
3 changed files
with
79 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
class Constants | ||
{ | ||
/** | ||
* 🇧🇷 Configurações de máscaras | ||
* 🇺🇸 Mask Settings | ||
* 🇮🇹 Impostazioni delle maschere | ||
*/ | ||
const CEP = '#####-###'; | ||
const CPF = '###.###.###-##'; | ||
|
||
/** | ||
* 🇧🇷 Tamanho exato de cada tipo de informação | ||
* 🇺🇸 Exact size of each type of information | ||
* 🇮🇹 Dimensione esatta di ogni tipo di informazione | ||
*/ | ||
const LENGTH = [ | ||
'CEP' => 8, | ||
'CPF' => 11 | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,25 @@ | ||
# Mask | ||
Mascarador de valores PHP | ||
# GoldMask | ||
|
||
Goldbach Algorithms Mask (fondly nicknamed GoldMask) is a PHP library developed for Symfony for apply a mask to strings. | ||
|
||
## Installation | ||
|
||
Use the composer to install: | ||
|
||
```bash | ||
composer require goldbach-algorithms/aig | ||
``` | ||
|
||
## Usage | ||
|
||
```php | ||
|
||
$mask = new Mask(); | ||
|
||
# returns '11025-140' | ||
$mask->transform(Mask::CEP, '11025140'); | ||
|
||
``` | ||
|
||
## License | ||
[MIT](https://choosealicense.com/licenses/mit/) |