Create an insecure bank application
This commit is contained in:
30
webroot/lib/View/Html.php
Normal file
30
webroot/lib/View/Html.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace View;
|
||||
|
||||
abstract class Html implements Sendable
|
||||
{
|
||||
public function send(): void
|
||||
{
|
||||
$this->sendHeader();
|
||||
echo '<!doctype html>';
|
||||
$this->sendHead();
|
||||
$this->sendBody();
|
||||
}
|
||||
|
||||
public function sendHeader(): void
|
||||
{
|
||||
}
|
||||
|
||||
public function sendHead(): void
|
||||
{
|
||||
echo '<meta charset="UTF-8"><title>';
|
||||
$this->sendTitle();
|
||||
echo '</title>';
|
||||
}
|
||||
|
||||
abstract public function sendTitle(): void;
|
||||
|
||||
abstract public function sendBody(): void;
|
||||
}
|
Reference in New Issue
Block a user