huesos/mirzaev/arming_bot/system/controllers/index.php

36 lines
743 B
PHP
Executable File

<?php
declare(strict_types=1);
namespace mirzaev\arming_bot\controllers;
// Files of the project
use mirzaev\arming_bot\controllers\core,
mirzaev\arming_bot\models\product;
/**
* Index controller
*
* @package mirzaev\arming_bot\controllers
* @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy>
*/
final class index extends core
{
/**
* Render the main page
*
* @param array $parameters Parameters of the request (POST + GET)
*/
public function index(array $parameters = []): ?string
{
// Поиск товаров
/* $this->view->products = product::read(); */
// Exit (success)
if ($_SERVER['REQUEST_METHOD'] === 'GET') return $this->view->render('catalog.html');
// Exit (fail)
return null;
}
}