renderPartial($template, $data); include __DIR__ . '/../views/' . $layout; } public function renderPartial($template, $data = []) { extract($data); ob_start(); include __DIR__ . '/../views/' . $template; return ob_get_clean(); } }