Отладка шаблончика

This commit is contained in:
Igor Barkov (iwork)
2020-09-30 14:12:39 +03:00
parent ca7b249bb2
commit 56a3a437a5
2 changed files with 66 additions and 130 deletions

View File

@@ -10,14 +10,25 @@ class Template
{
}
public static function header($title = null)
/**
* @param string|null $title
* @param int|null $return
*
* @return false|string
*/
public static function header(string $title = null, int $return = null)
{
return <<<HTML_HEADER
$head = <<<HTML_HEADER
<!doctype html>
<html lang="ru">
<meta charset="utf-8">
<link href="/css/main.css" rel="stylesheet">
<title>$title</title>
HTML_HEADER;
if (!$return) {
echo $head;
return false;
}
return $head;
}
}