PHP code example of datweb-sistemas / vo

1. Go to this page and download the library: Download datweb-sistemas/vo library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

datweb-sistemas / vo example snippets


use Datweb\Vo\Compostos\Cpf;

// Cria uma nova instância de CPF com validação
$cpf = new Cpf('123.456.789-09');

// Obtém o valor formatado
echo $cpf->getFormatted(); // 123.456.789-09

// Obtém o valor mascarado para logs
echo $cpf->getMasked(); // ***.***.***-**

// Obtém o valor parcialmente mascarado
echo $cpf->getPartiallyMasked(); // ***.***.789-09

interface MaskablePII extends PII
{
    public function getMasked(): string;
    public function getPartiallyMasked(): string;
}