Create an insecure bank application
This commit is contained in:
32
webroot/lib/View/BankingPage.php
Normal file
32
webroot/lib/View/BankingPage.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace View;
|
||||
|
||||
use Model\Context;
|
||||
|
||||
abstract class BankingPage extends Html
|
||||
{
|
||||
public function __construct(protected Context $context)
|
||||
{
|
||||
}
|
||||
|
||||
public function sendHead(): void
|
||||
{
|
||||
parent::sendHead();
|
||||
echo '<link href="/style.css" rel="stylesheet">';
|
||||
}
|
||||
|
||||
public function sendBody(): void
|
||||
{
|
||||
echo '<nav><ul>';
|
||||
foreach ($this->context->navigation as $entry) {
|
||||
$entry->send($this->context);
|
||||
}
|
||||
echo '</ul></nav><main>';
|
||||
$this->sendMainContent();
|
||||
echo '</main>';
|
||||
}
|
||||
|
||||
abstract public function sendMainContent(): void;
|
||||
}
|
Reference in New Issue
Block a user