21 lines
481 B
PHP
21 lines
481 B
PHP
|
|
<?php
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
class TaskCertView
|
||
|
|
{
|
||
|
|
public static function renderPartial(string $pageFile, array $viewData = []): void
|
||
|
|
{
|
||
|
|
if (!file_exists($pageFile)) {
|
||
|
|
throw new RuntimeException('task_cert view not found: ' . $pageFile);
|
||
|
|
}
|
||
|
|
|
||
|
|
extract($viewData, EXTR_SKIP);
|
||
|
|
require $pageFile;
|
||
|
|
}
|
||
|
|
|
||
|
|
public static function e($value): string
|
||
|
|
{
|
||
|
|
return htmlspecialchars((string) $value, ENT_QUOTES, 'UTF-8');
|
||
|
|
}
|
||
|
|
}
|