We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents db59063 + 9d6b2ff commit ad47f39Copy full SHA for ad47f39
src/PHPWord/Template.php
@@ -91,7 +91,14 @@ public function setValue($search, $replace) {
91
92
$this->_documentXML = str_replace($search, $replace, $this->_documentXML);
93
}
94
-
+ /**
95
+ * Returns array of all variables in template
96
+ */
97
+ public function getVariables()
98
+ {
99
+ preg_match_all('/\$\{(.*?)}/i', $this->_documentXML, $matches);
100
+ return $matches[1];
101
+ }
102
/**
103
* Save Template
104
*
0 commit comments