lib/PHPWord/PHPWord/Template.php
public function setValue($search, $replace) {
        if(substr($search, 0, 2) !== '${' && substr($search, -1) !== '}') {
            $search = '${'.$search.'}';
        }
        
        $this->_documentXML = str_replace($search, $replace, $this->_documentXML);
    }
public function setValue($search, $replace) {
        if(substr($search, 0, 2) !== '${' && substr($search, -1) !== '}') {
            $search = '${'.$search.'}';
        }
        
        $this->_documentXML = str_replace($search, $replace, $this->_documentXML);
    }
public function setValue ( $ search , $ replace ) { if ( substr ( $ search , 0 , 2 ) !== '${' && substr ( $ search , - 1 ) !== '}' ) { $ search = '${' . $ search . '}' ; } $ this -> _documentXML = str_replace ( $ search , $ replace , $ this -> _documentXML ) ; }
Set a Template value

@param mixed $search
@param mixed $replace
Set a Template value