PHP code example of ifro / gru-siafi

1. Go to this page and download the library: Download ifro/gru-siafi 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/ */

    

ifro / gru-siafi example snippets





use \GruSiafi\UgIfro;
use \GruSiafi\UnidadeGestora;
use \GruSiafi\GruSiafi;
use \GruSiafi\DadosGru;
use \GruSiafi\Recolhimento as R;

$ug = new UnidadeGestora();
$ug->setCodigo('158148')
    ->setGestao('26421')
    ->setCodigoCorrelacao('10428')
    ->setNomeUnidade('INST.FED.DE EDUC.,CIENC.E TEC.DE RONDONIA')
    ->setCodigoRecolhimento(R::TAXA_DE_INSCRICAO_EM_CONCURSO_PUBLICO);

$dadosGru = new DadosGru(
    '1000123456',
    '123.456.789-00',
    'FULANO DE TAL',
    '80,00',
    '80,00');

$gruSiafi = new GruSiafi($ug, $dadosGru);

header("Content-type:application/pdf");
header("Content-Disposition:inline");

echo $gruSiafi->getPDF();