404 + рефакторинг + докблоки и комменты
This commit is contained in:
@@ -1,9 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types = 1);
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Controllers;
|
||||
|
||||
use Exception;
|
||||
use Flight;
|
||||
|
||||
/**
|
||||
* Абстрактный контроллер для расширения
|
||||
*/
|
||||
abstract class Controller
|
||||
{
|
||||
/**
|
||||
* Перебрасывает на страницу 404 при ненайденном плейлисте
|
||||
*
|
||||
* @param string $id
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function notFound(string $id): void
|
||||
{
|
||||
Flight::response()->status(404)->sendHeaders();
|
||||
view('notfound', ['id' => $id]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user