<?php /* * Copyright (c) 2022. Micha Espey <tracer@24unix.net> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * */ namespace App\Controller; use App\Entity\User; use App\Service\Router; use App\Service\Template; use App\Repository\UserRepository; use JetBrains\PhpStorm\NoReturn; class AddressBookController { public function __construct( private readonly Template $template, private readonly User $user, private readonly UserRepository $userRepository, private readonly Router $router ) { // empty body } #[NoReturn] public function main(): void { $this->template->render(templateName: 'index.html.php', vars: [ 'user' => $this->user, 'router' => $this->router ]); } }