"5° NOTARÍA DE SANTIAGO\nPATRICIO RABY BENAVENTE",
'contenido' => "Gertrudis Echenique 30, of. 32, El Golf\n Metro Alcantara"
];
$links = $manager->folder('data')->load('documentos.yml');
array_walk($links->documentos, function(&$item) use ($container) {
$item = new Documento($container, $item->texto, $item->uri);
});
array_walk($links->consulta, function(&$item) {
$item = new Link($item->texto, $item->uri);
});
$aviso = $manager->folder('data')->load('aviso.yml');
$transparencia = $manager->folder('data')->load('transparencia.yml')->activo;
return $view->render($response, 'home', compact('banner', 'aviso', 'links', 'transparencia'));
}
}
class Documento {
protected $icono;
protected $texto;
protected $uri;
public function __construct(Container $container, string $nombre, string $uri = '') {
$this->icono = implode('/', [$container->get('urls.images'), $nombre . '.png']);
$this->texto = $nombre;
$this->uri = $uri;
if ($uri == '') {
$this->uri = implode('/', [$container->get('urls.base'), 'documentos', strtolower($nombre)]);
}
}
public function show(): string {
return '
' . $this->texto . '';
}
}
class Link {
protected $uri;
protected $texto;
public function __construct(string $texto, string $uri) {
$this->texto = $texto;
$this->uri = $uri;
}
public function show(): string {
return '' . $this->texto . '';
}
}