Великое объединение магазинов. #54.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Core;
|
||||
|
||||
class View
|
||||
{
|
||||
public static function render(string $view, array $arguments = [])
|
||||
{
|
||||
extract($arguments, EXTR_SKIP);
|
||||
$file = $_SERVER['DOCUMENT_ROOT'] . "/_incl_data/Views/$view";
|
||||
|
||||
if (is_readable($file)) {
|
||||
require $file;
|
||||
} else {
|
||||
trigger_error("File $file not found!", E_USER_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user