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.
Interfaces
Properties
: string
Methods
__construct()
: mixed
Creates a new TemplateLoader instance.
load()
: string
Loads a license template file by its filename.
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
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")
throws
RuntimeException
Description
if the template file is not found
Return values
string
Description
The template content