a.binder 8 年之前
父节点
当前提交
738c6c67c6
共有 1 个文件被更改,包括 9 次插入4 次删除
  1. 9 4
      SE/se-lib/Route/WfsBiAudit.php

+ 9 - 4
SE/se-lib/Route/WfsBiAudit.php

@@ -90,7 +90,12 @@ public function objectStructView($item) {
 		return $return;
 
 	}
-
+	
+	private function AddChildComment($node, $name, $value = null) {
+		$child = $this->dom->createComment($name, $value);
+		$node->appendChild($child);
+		return $child;
+	}
 
 
 	private function addChild($node, $name, $value = null) {
@@ -312,17 +317,17 @@ public function objectStructView($item) {
 										}
 									}
 								} else {
-									$this->addChild($dataNode, $fieldName, "<!-- TODO 'p5:links/{$p5LinkKey}': " . str_replace('&', '&amp;', var_export($p5LinkValue, true)) . " -->");
+									$this->AddChildComment($dataNode, $fieldName, " TODO 'p5:links/{$p5LinkKey}': " . str_replace('&', '&amp;', var_export($p5LinkValue, true)) . " ");
 								}
 							}
 						} else {
-							$this->addChild($dataNode, $fieldName, "<!-- TODO add info ref ({$refKey}): " . str_replace('&', '&amp;', var_export($refValue, true)) . " -->");
+							$this->AddChildComment($dataNode, $fieldName, " TODO add info ref ({$refKey}): " . str_replace('&', '&amp;', var_export($refValue, true)) . " ");
 						}
 					}
 				} else if (NULL === $value) {
 					$this->addChild($dataNode, "{$nsPrefix}:{$fieldName}"); // xs:nil ?
 				} else {
-					$this->addChild($dataNode, $fieldName, "<!-- TODO: " . var_export($value, true) . " -->");
+					$this->AddChildComment($dataNode, $fieldName, " TODO: " . var_export($value, true) . " ");
 				}
 			}
 		} catch (Exception $e) {