2024-06-18 22:41:03 -04:00
|
|
|
<?php
|
|
|
|
namespace Incoviba\Controller\Inmobiliarias;
|
|
|
|
|
|
|
|
use Psr\Http\Message\ResponseInterface;
|
|
|
|
use Psr\Http\Message\ServerRequestInterface;
|
|
|
|
use Incoviba\Common\Implement\Exception\EmptyResult;
|
|
|
|
use Incoviba\Common\Alias\View;
|
|
|
|
use Incoviba\Repository;
|
|
|
|
use Incoviba\Service;
|
|
|
|
|
|
|
|
class Proveedores
|
|
|
|
{
|
|
|
|
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, View $view,
|
2024-11-29 17:47:12 -03:00
|
|
|
Service\Inmobiliaria\Proveedor $proveedorService,
|
2024-06-18 22:41:03 -04:00
|
|
|
Repository\Inmobiliaria\TipoSociedad $tipoSociedad): ResponseInterface
|
|
|
|
{
|
2024-11-29 17:47:12 -03:00
|
|
|
$proveedores = [];
|
2024-06-18 22:41:03 -04:00
|
|
|
try {
|
2024-11-29 17:47:12 -03:00
|
|
|
$proveedores = $proveedorService->getAll('nombre');
|
2024-06-18 22:41:03 -04:00
|
|
|
} catch (EmptyResult) {}
|
2024-11-29 17:47:12 -03:00
|
|
|
return $view->render($response, 'inmobiliarias.proveedores', compact('proveedores'));
|
2024-06-18 22:41:03 -04:00
|
|
|
}
|
|
|
|
}
|