27 $this->_targetVar = $var;
39 $varNames = func_get_args();
40 if(count($varNames) < 0)
45 $use_context = is_null($this->_targetVar);
48 if(!count($varNames) || (!is_object($this->_targetVar) && !is_array($this->_targetVar)))
53 $is_object = is_object($this->_targetVar);
56 foreach($varNames as $varName)
58 $varName = explode(
'.', $varName);
59 $varName0 = array_shift($varName);
66 $var = $is_object ? $this->_targetVar->{$varName0} : $this->_targetVar[$varName0];
87 $this->_targetVar->{$varName0} = $var;
91 $this->_targetVar[$varName0] = $var;
96 $this->_targetVar = $var;
102 return $this->_targetVar;
116 if(strncmp(
'$user_lang->', $var, 12) !== 0)
118 $var = htmlspecialchars($var, ENT_COMPAT | ENT_HTML401,
'UTF-8',
false);
124 if(!count($name) || (!is_array($var) && !is_object($var)))
129 $is_object = is_object($var);
130 $name0 = array_shift($name);
134 $target = $is_object ? $var->{$name0} : $var[$name0];
135 $target = $this->_encodeHTML($target, $name);
137 if($target ===
false)
144 $var->{$name0} = $target;
148 $var[$name0] = $target;
154 foreach($var as $key => $target)
156 $cloned_name = array_slice($name, 0);
157 $target = $this->_encodeHTML($target, $name);
158 $name = $cloned_name;
160 if($target ===
false)
167 $var->{$key} = $target;
171 $var[$key] = $target;
188 if(!$xml)
return FALSE;
190 if(strpos($xml,
'<!ENTITY') !== FALSE)
196 $header = preg_replace(
'/<\?xml.*?\?'.
'>/s',
'', substr($xml, 0, 100), 1);
197 $xml = trim(substr_replace($xml, $header, 0, 100));
204 $header = preg_replace(
'/^<!DOCTYPE[^>]*+>/i',
'', substr($xml, 0, 200), 1);
205 $xml = trim(substr_replace($xml, $header, 0, 200));
212 $root_tag = substr($xml, 0, strcspn(substr($xml, 0, 20),
"> \t\r\n"));
215 if(strtoupper($root_tag) ==
'<!DOCTYPE')
220 if(!in_array($root_tag, array(
'<methodCall',
'<methodResponse',
'<fault')))
set($key, $val, $set_to_get_vars=0)
_encodeHTML($var, $name=array())
static detectingXEE($xml)
check XML External Entity