Merge pull request #7 from SergeC/patch-1

Update src/PHPWord/Template.php
This commit is contained in:
Mark Baker 2012-09-08 03:43:28 -07:00
commit ad47f3997c
1 changed files with 8 additions and 1 deletions

View File

@ -91,7 +91,14 @@ class PHPWord_Template {
$this->_documentXML = str_replace($search, $replace, $this->_documentXML);
}
/**
* Returns array of all variables in template
*/
public function getVariables()
{
preg_match_all('/\$\{(.*?)}/i', $this->_documentXML, $matches);
return $matches[1];
}
/**
* Save Template
*