Merge pull request #7 from SergeC/patch-1
Update src/PHPWord/Template.php
This commit is contained in:
commit
ad47f3997c
@ -91,7 +91,14 @@ class PHPWord_Template {
|
|||||||
|
|
||||||
$this->_documentXML = str_replace($search, $replace, $this->_documentXML);
|
$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
|
* Save Template
|
||||||
*
|
*
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user