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

?>