From: Eduardo Date: Fri, 10 Nov 2023 13:34:10 +0000 (+0100) Subject: documented functions X-Git-Url: http://git.edufdez.es/?a=commitdiff_plain;h=7a8324a15657bca36cfac2b97abc33f1f7c8e82b;p=thericegoat.com.git documented functions --- diff --git a/page-generator/generator.php b/page-generator/generator.php index c7e5f3a..abaf483 100644 --- a/page-generator/generator.php +++ b/page-generator/generator.php @@ -44,6 +44,9 @@ class CodeGenerator } } + /** + * Create a folder structure for a given list of pages + */ function generateFoldersForPages(array $folderList, $basePath) { foreach ($folderList as $folder) { @@ -73,6 +76,9 @@ class CodeGenerator return "$$" . $name . "$$"; } + /** + * Replace a template variable with a given value + */ function setTemplateVar(string $filePath, string $var, string $value) { $replaceVar = "$$" . $var . "$$"; @@ -82,11 +88,17 @@ class CodeGenerator file_put_contents($filePath, $content, LOCK_EX); } + /** + * Returns a string with a span tag with a title set + */ function spanTitle(string $title, string $text): string { return "$text "; } + /** + * Returns a string with an anchor tag + */ function a(string $url, string $text, string $title = null): string { $str = "