Goal-Calibration/app/View/ViewController.php

70 lines
1.7 KiB
PHP

<?php
namespace App\View;
use Psr\Http\Message\ResponseInterface as Response;
class ViewController
{
public function admin(Response $response): Response
{
$html = file_get_contents(__DIR__ . '/../../views/templates/admin.php', true);
$response->getBody()->write($html);
return $response;
}
public function texts(Response $response): Response
{
$html = file_get_contents(__DIR__ . '/../../views/templates/texts.php', true);
$response->getBody()->write($html);
return $response;
}
public function text(Response $response): Response
{
$html = file_get_contents(__DIR__ . '/../../views/templates/text.php', true);
$response->getBody()->write($html);
return $response;
}
public function home(Response $response): Response
{
$html = file_get_contents(__DIR__ . '/../../views/templates/home.php', true);
$response->getBody()->write($html);
return $response;
}
public function today(Response $response): Response
{
$html = file_get_contents(
__DIR__ . '/../../views/templates/today.php'
);
$response->getBody()->write($html);
return $response;
}
public function login(Response $response): Response
{
$html = file_get_contents(
__DIR__ . '/../../views/templates/login.php'
);
$response->getBody()->write($html);
return $response;
}
public function register(Response $response): Response
{
$html = file_get_contents(
__DIR__ . '/../../views/templates/register.php'
);
$response->getBody()->write($html);
return $response;
}
}