public override void ExportPhpScriptCode(ActionBranch currentAction, ActionBranch nextAction, StringCollection jsCode, StringCollection methodToCompile, JsMethodCompiler data) { IMathExpression mathExp = MathExp; if (mathExp != null) { string ce = mathExp.ReturnPhpScriptCodeExpression(methodToCompile); if (!string.IsNullOrEmpty(ce)) { string target = null; string output = null; if (nextAction != null) { if (nextAction.UseInput) { methodToCompile.Add(currentAction.OutputCodeName); methodToCompile.Add("="); methodToCompile.Add(ce); methodToCompile.Add(";\r\n"); output = currentAction.OutputCodeName; } } IVariable v = mathExp.OutputVariable; if (v != null) { string ceCondition = null; if (Condition != null) { ceCondition = Condition.CreatePhpScriptCode(methodToCompile); } target = v.ExportPhpScriptCode(methodToCompile); string jsLine; if (output != null) { jsLine = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}={1};\r\n", target, currentAction.OutputCodeName); } else { jsLine = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}={1};\r\n", target, ce); } if (string.IsNullOrEmpty(ceCondition)) { methodToCompile.Add(jsLine); } else { methodToCompile.Add("if("); methodToCompile.Add(ceCondition); methodToCompile.Add(")\r\n{\r\n"); methodToCompile.Add(jsLine); methodToCompile.Add("\r\n}\r\n"); } } } } }