Carpeta includes

This commit is contained in:
Axel Axt
2026-08-04 19:21:56 -03:00
parent 9ef9194f9e
commit ea2a40d0d5
5 changed files with 302 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
<?php
// Requiere el header y footer
require_once __DIR__ . '/header.php';
require_once __DIR__ . '/footer.php';
class Page {
private $header;
private $footer;
private $body = '';
// Setea el header y footer
function __construct() {
$this->header = new Header();
$this->footer = new Footer();
}
// Setea el body obtenido por pageController
public function setBody($html) {
$this->body = $html;
}
// Retorna layout HTML
public function getHTML() {
$page = $this->header->render();
$page .= $this->body;
$page .= $this->footer->render();
return $page;
}
}
?>