$path
$path : string
Template class to use Twig to generate templates.
setExtension(string $extension) : void
Sets the file extension used to determine the template filename.
The file extension of the destination format needs to be set. This is used to retrieve the correct template.
string | $extension | an extension (thus only containing alphanumeric characters and be between 2 and 4 characters in size). |
if the extension does not match the validation restrictions mentioned above.
decorate(string $contents, array<mixed,string> $options = array()) : string
Applies the relevant template upon the given content.
This method takes the combines the template with the given contents and generates a final piece of text from that.
The user may add additional options that are set as parameters in the template.
string | $contents | |
array<mixed,string> | $options |
getAssets() : array<mixed,string>
Returns a list of files that need to be copied to the destination location.
Examples of assets can be:
Assets for this template engine means every file that is contained in a subfolder of the template folder and does not end with the extension twig.
Thus every file in the root of the template folder is ignored and files and directories having only twig templates (considered as being includes) are not included in this list.
getTemplateFilename() : string
Returns the filename for the template.
The filename is composed of the following components:
if the template does not exist.