Files
ByteCenter/app/includes/page.php
T
2026-08-04 19:21:56 -03:00

37 lines
671 B
PHP

<?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;
}
}
?>