amdp3-metaforums/Application/Services/View.php
2019-11-19 02:18:37 +07:00

15 lines
359 B
PHP

<?php
namespace Application\Services;
class View {
public function render($path, $args = []) {
ob_start();
extract($args);
$auth = ServiceContainer::Authentication();
include('Application/Views/'.$path.'.php');
$rendered_string = ob_get_contents();
ob_end_clean();
return $rendered_string;
}
}