site-tordv-calculator/mirzaev/calculator/system/controllers/contacts_controller.php

39 lines
1.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
declare(strict_types=1);
namespace mirzaev\calculator\controllers;
use mirzaev\calculator\controllers\core;
use mirzaev\calculator\models\accounts_model as accounts;
/**
* Контроллер контактов
*
* @package mirzaev\calculator\controllers
* @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy>
*/
final class contacts_controller extends core
{
/**
* Контакты (страница)
*
* HTML-документ с контактами
*
* @param array $vars Параметры
*
* @return string HTML-докумкент
*/
public function index(array $vars = []): string
{
// Инициализация журнала ошибок
$vars['errors'] = ['contacts' => []];
// Инициализация аккаунта
$vars['account'] = accounts::account($vars['errors']['contacts']);
// Генерация представления
return $this->view->render(DIRECTORY_SEPARATOR . 'contacts' . DIRECTORY_SEPARATOR . 'index.html', $vars);
}
}