dir commit

This commit is contained in:
2022-10-21 20:26:20 +02:00
parent f6a5e96576
commit 2a8fa3f397
4 changed files with 343 additions and 8 deletions
src

@ -3,12 +3,38 @@
namespace App\Controller;
use App\Service\Template;
use stdClass;
class AddressBook extends stdClass
class AddressBook
{
public function __construct(Template $template)
public function __construct(private readonly Template $template)
{
$template->render(templateName: 'index.tpl');
}
public function main(): void
{
try {
$this->template->render(templateName: 'index.tpl');
} catch (\Exception $e) {
die($e->getMessage());
}
}
public function admin(string $command = '')
{
try {
$this->template->render(templateName: 'admin/index.tpl');
} catch (\Exception $e) {
die($e->getMessage());
}
}
public function login()
{
try {
$this->template->render(templateName: 'admin/index.tpl');
} catch (\Exception $e) {
die($e->getMessage());
}
}
}