@@ 152-168 (lines=17) @@ | ||
149 | foreach($this->aParameters as &$xParameter) |
|
150 | { |
|
151 | $sParameterStr = $xParameter->getScript(); |
|
152 | if($xParameter instanceof \Jaxon\Response\Plugin\JQuery\Dom\Element) |
|
153 | { |
|
154 | if(!array_key_exists($sParameterStr, $aVariables)) |
|
155 | { |
|
156 | // The value is not yet defined. A new variable is created. |
|
157 | $sVarName = "jxnVar$nVarId"; |
|
158 | $aVariables[$sParameterStr] = $sVarName; |
|
159 | $sVars .= "$sVarName=$xParameter;"; |
|
160 | $nVarId++; |
|
161 | } |
|
162 | else |
|
163 | { |
|
164 | // The value is already defined. The corresponding variable is assigned. |
|
165 | $sVarName = $aVariables[$sParameterStr]; |
|
166 | } |
|
167 | $xParameter = new Parameter(Jaxon::JS_VALUE, $sVarName); |
|
168 | } |
|
169 | } |
|
170 | ||
171 | $sPhrase = ''; |
|
@@ 182-198 (lines=17) @@ | ||
179 | foreach($this->aMessageArgs as &$xParameter) |
|
180 | { |
|
181 | $sParameterStr = $xParameter->getScript(); |
|
182 | if($xParameter instanceof \Jaxon\Response\Plugin\JQuery\Dom\Element) |
|
183 | { |
|
184 | if(!array_key_exists($sParameterStr, $aVariables)) |
|
185 | { |
|
186 | // The value is not yet defined. A new variable is created. |
|
187 | $sVarName = "jxnVar$nVarId"; |
|
188 | $aVariables[$sParameterStr] = $sVarName; |
|
189 | $sVars .= "$sVarName=$xParameter;"; |
|
190 | $nVarId++; |
|
191 | } |
|
192 | else |
|
193 | { |
|
194 | // The value is already defined. The corresponding variable is assigned. |
|
195 | $sVarName = $aVariables[$sParameterStr]; |
|
196 | } |
|
197 | $xParameter = new Parameter(Jaxon::JS_VALUE, $sVarName); |
|
198 | } |
|
199 | $xParameter = "'$nParamId':" . $xParameter->getScript(); |
|
200 | $nParamId++; |
|
201 | } |