32 lines
784 B
PHP
32 lines
784 B
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;
|
|
}
|
|
}
|