TemplateLoader

Class
Read only: Yes Final: Yes

Loads license template files from the filesystem.

Description

This class reads license template files from a configured templates directory. The default directory is the packaged resources/licenses folder.

Table of Contents

Interfaces

TemplateLoaderInterface

Loads license template files from the filesystem.

Properties

 : string

Methods

__construct()

Creates a new TemplateLoader instance.

 : mixed
load()

Loads a license template file by its filename.

 : string
Properties
Methods

__construct()

Public

Creates a new TemplateLoader instance.

public __construct([ string|null  $templatesPath = null]) : mixed
Parameters
$templatesPath : string|null = null

Description

Optional custom path to the templates directory

load()

Public

Loads a license template file by its filename.

public load( string  $templateFilename) : string
Parameters
$templateFilename : string

Description

The filename of the template to load (e.g., "mit.txt")

Tags
throws
RuntimeException

Description

if the template file is not found

Return values
string

Description

The template content