-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.php
40 lines (31 loc) · 1.05 KB
/
client.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
require '../vendor/autoload.php';
use Jb\Integras\Sei\IntegrasSEI;
use Jb\Integras\Sei\IntegrasConfigParamenterSEI;
$config = (object)require_once './config.php';
try {
$seiCfg = new IntegrasConfigParamenterSEI($config, '3.0.0');
// $seiCfg = new IntegrasConfigParamenterSEI($config, '2.6.0');
$x = IntegrasSEI::factory($seiCfg);
// $filePath = '../docs/SEI-Instalacao-v2.6.0.pdf';
// $fileContent = file_get_contents($filePath);
// echo '<pre>';
// print_r($x->adicionarArquivo(
// 'SEI-Instalacao-v2.6.0.pdf'
// ,filesize($filePath)
// ,md5($fileContent)
// ,base64_encode($fileContent)
// ,null
// ));
echo '<pre>';
// 3.0.0
// print_r($x->consultarProcedimento('9999.0000001/2017-62'));
// print_r($x->reabrirProcesso('9999.0000001/2017-62'));
// 2.6.0
print_r($x->consultarProcedimento('50603.002985/2017-43'));
die;
} catch (\Exception $e) {
echo '<pre>';
print_r($e->getMessage());
die('<b>File: </b>' . __FILE__ . ' <br/><b>Linha: </b>' . __LINE__);
}