$content) { $template = str_replace('%' . $name . '%', $content, $template); } } return $template; } /** * @param string $path * @return bool */ public function canRender($path) { return mb_strpos($path, '.htm') !== false && file_exists($path); } }