"5° NOTARIA DE SANTIAGO",
'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, $item->icono);
});
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;
$months = (object) ['full' => [], 'short' => []];
$m = Carbon::createFromDate(0, 1, 1);
for ($i = 0; $i < 12; $i ++) {
$months->full []= ucwords($m->copy()->addMonths($i)->locale('es_ES')->isoFormat('MMMM'));
$months->short []= ucwords($m->copy()->addMonths($i)->locale('es_ES')->isoFormat('MMM'));
}
return $view->render($response, 'home', compact('banner', 'aviso', 'links', 'transparencia', 'months'));
}
}
class Documento {
protected $icono;
protected $texto;
protected $uri;
public function __construct(Container $container, string $nombre, string $uri = '', string $icono = '') {
$this->icono = $icono;
if ($icono == '') {
$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 . '';
}
}