<?php

namespace src\Controller;

use src\Service\geralService;
use src\Utils\responseHelpers;
use src\Utils\validator;
// use src\Model\clienteModel;
use Exception;

class geralController
{
    private $geralService;

    public function __construct(geralService $geralService)
    {
        $this->geralService = $geralService;
    } 

    public function localizar() {
        try {
            return $this->geralService->localizar(1);
        } catch (Exception $e) {
            responseHelpers::sendErrorResponse($e->getMessage(), 500);
        }
    }

    // public function salvar(\src\Model\geralModel $geral)
    // {
    //     $geralService = new \src\Service\geralService();
    //     return $geralService->salvar($geral);
    // }

    // public function localizar($id)
    // {
    //     $geralService = new \src\Service\geralService();
    //     return $geralService->localizar($id);
    // }

    // public function atualizar(\src\Model\geralModel $geral)
    // {
    //     $geralService = new \src\Service\geralService();
    //     return $geralService->atualizar($geral);
    // }
}
