/ LJCPHPCodeDoc / LJCGenTextLib / LJCGenText / ProcessTemplate


Parameters
$templateFileSpec - The template file.
$sections - The data sections.

Syntax

PHP
public function ProcessTemplate(string $templateFileSpec
, LJCSections $sections) : ?string

Processes the Template and Data to produce the output string.

Example

PHP
 $webCommonPath = "c:/inetpub/wwwroot/LJCPHPCommon";
 require_once "$webCommonPath/LJCGenTextLib.php";
 require_once "$webCommonPath/LJCGenTextSectionLib.php";
 
 // $sections is an LJCSections object.
 $sections = LJCSections::Deserialize("Sections.xml");
 
 $genText = new LJCGenText();
 $templateFileSpec = "GenDataLib\Templates\ClassTemplate.html";
 $outputString = $genText->ProcessTemplate($templateFileSpec, $sections);

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.