Skip to content
Snippets Groups Projects
Commit 488e61ca authored by Peter Rotich's avatar Peter Rotich
Browse files

Add ability to overwrite object variable.

 e.g %{staff.*} can be overwritten by a string (placeholder) as assign('staff', 'SYSTEM').
parent e3b01cb1
No related branches found
No related tags found
No related merge requests found
......@@ -110,6 +110,8 @@ class VariableReplacer {
$parts = explode('.', $var, 2);
if($parts && ($obj=$this->getObj($parts[0])))
return $this->getVar($obj, $parts[1]);
elseif($parts[0] && @isset($this->variables[$parts[0]])) //root overwrite
return $this->variables[$parts[0]];
//Unknown object or variable - leavig it alone.
$this->setError('Unknown obj for "'.$var.'" tag ');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment