dir commit
This commit is contained in:
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());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user