feature/cierres (#25)

Varios cambios

Co-authored-by: Juan Pablo Vial <jpvialb@incoviba.cl>
Reviewed-on: #25
This commit is contained in:
2025-07-22 13:18:00 +00:00
parent ba57cad514
commit 307f2ac7d7
418 changed files with 20045 additions and 984 deletions

View File

@ -11,14 +11,33 @@ class Proyecto
protected Repository\Proyecto $proyectoRepository,
protected Repository\Proyecto\EstadoProyecto $estadoProyecto
) {}
public function getVendibles(): array
/**
* @param string|array|null $orderBy
* @return array
*/
public function getAll(null|string|array $orderBy = null): array
{
return $this->proyectoRepository->fetchAllActive();
try {
return array_map([$this, 'process'], $this->proyectoRepository->fetchAll($orderBy));
} catch (Implement\Exception\EmptyResult) {
return [];
}
}
public function getVendibles(null|string|array $orderBy = null): array
{
return $this->proyectoRepository->fetchAllActive($orderBy);
}
public function getEscriturando(): array
{
return $this->proyectoRepository->fetchAllEscriturando();
}
/**
* @param int $proyecto_id
* @return Model\Proyecto
* @throws Implement\Exception\EmptyResult
*/
public function getById(int $proyecto_id): Model\Proyecto
{
return $this->process($this->proyectoRepository->fetchById($proyecto_id));