20240814#2
This commit is contained in:
24
src/Infrastructure/Controllers/IndexController.php
Normal file
24
src/Infrastructure/Controllers/IndexController.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Infrastructure\Controllers;
|
||||
use Base\Infrastructure\Controllers\AbstractPageController;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
class IndexController extends AbstractPageController {
|
||||
|
||||
/**
|
||||
* @return bool|ResponseInterface
|
||||
*/
|
||||
public function index() : bool|ResponseInterface {
|
||||
try {
|
||||
//$this->addHeader("App-Mode", "Dev");
|
||||
$this->template()->setValue("title", "Главная");
|
||||
}
|
||||
catch(\Throwable $e){$error = $this->checkError($e);}
|
||||
|
||||
return $this->renderResponse("main", "@main/index.tpl", [
|
||||
"date" => (new \DateTime())->format('Y-m-d H:i:s'),
|
||||
"error" => $error ?? null
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user