-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
36 lines (25 loc) · 1.27 KB
/
index.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
<?php declare(strict_types=1);
namespace App;
use App\Controller\IntegratorController;
use Siler\{Route, Http\Response};
use Symfony\Component\DependencyInjection\ContainerBuilder;
/** @var ContainerBuilder $container */
$container = require __DIR__ . '/bootstrap.php';
Route\get('/v1/find-information-by-id/{informationId}', function (array $routeParams) use ($container) {
/** @var IntegratorController $integratorController */
$integratorController = $container->get('integrator.controller');
$integratorController->findInformationById($routeParams['informationId']);
});
Route\get('/v1/find-information-all-by-cpf/{cpf}', function (array $routeParams) use ($container) {
/** @var IntegratorController $integratorController */
$integratorController = $container->get('integrator.controller');
$integratorController->findInformationAllByCpf($routeParams['cpf']);
});
Route\get('/v1/find-information-by-cpf-service-one-two/{cpf}', function (array $routeParams) use ($container) {
/** @var IntegratorController $integratorController */
$integratorController = $container->get('integrator.controller');
$integratorController->findInformationByCpfServiceOneAndTwo($routeParams['cpf']);
});
if (!Route\did_match()) {
Response\json('Not found', 404);
}