PHP code example of inovanti-bank / inovanti-toolkit

1. Go to this page and download the library: Download inovanti-bank/inovanti-toolkit 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/ */

    

inovanti-bank / inovanti-toolkit example snippets


use InovantiBank\Toolkit\Helpers\StringHelper;

$stringHelper = new StringHelper();

echo $stringHelper->formatName("JOÃO DA SILVA LTDA", true, true);
// Saída: "João Silva"

use InovantiBank\Toolkit\Helpers\NumberHelper;

$numberHelper = new NumberHelper();

echo $numberHelper->formatCurrency(1234.56);
// Saída: "R$ 1.234,56"

use InovantiBank\Toolkit\Helpers\DateHelper;

$dateHelper = new DateHelper();

echo $dateHelper->formatDate('2025-01-28');
// Saída: "28/01/2025"

use InovantiBank\Toolkit\Helpers\FormatterHelper;

$formatter = new FormatterHelper();

echo $formatter->formatDateRelative('2025-01-28 14:01:23');
// Saída: "há 2 dias"

use InovantiBank\Toolkit\Helpers\ValidatorHelper;

$validator = new ValidatorHelper(new StringHelper());

echo $validator->isValidCPF('123.456.789-09') ? "Válido" : "Inválido";
// Saída: "Inválido"

use InovantiBank\Toolkit\Helpers\UnitConverter;

$converter = new UnitConverter();

echo $converter->bytesToHumanReadable(1048576);
// Saída: "1.00 MB"