amdp3-metaforums/Application/Services/View.php

15 lines
359 B
PHP
Raw Normal View History

2019-11-18 13:33:45 +00:00
<?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;
}
}