getTemplateVariables

getTemplateVariables

BASIC / ADVANCED / PREMIUM

Returns the template placeholder variables as an array.

Description
public getTemplateVariables ()

This method returns all phpdocx placeholder variables of the current template.

In order to work properly with this method, it is recommended not to use the symbol chosen for delimiting the placeholders in other contents of the document. It is preferable to have a unique symbol in the document or ${} for placeholders.

Parameters

This method takes no parameters.

Return values

Array with the template variables included in the Word template

Code samples

Example #1

The resulting Word document looks like: