You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes we need to replace only several string occurrences in text. Current implementation of the corresponded method of Template class looks like as followed
/** * Set a Template value * * @param mixed $search * @param mixed $replace */publicfunctionsetValue($search, $replace)
{
...$this->_documentXML = str_replace($search, $replace, $this->_documentXML);
}
This gives us no chance to replace, for example, the first occcurrence only.
This issue is a proposal of setValue method inhancement by implementing the followed signature:
/** * Set a Template value * * @param mixed $search * @param mixed $replace * @param integer $limit */publicfunctionsetValue($search, $replace, $limit = -1) {
...
}
The text was updated successfully, but these errors were encountered:
Sometimes we need to replace only several string occurrences in text. Current implementation of the corresponded method of Template class looks like as followed
This gives us no chance to replace, for example, the first occcurrence only.
This issue is a proposal of setValue method inhancement by implementing the followed signature:
The text was updated successfully, but these errors were encountered: