Procházet zdrojové kódy

Merge branch 'master' of bn.git:plabudda/se

Piotr Labudda před 8 roky
rodič
revize
edfaa03a5d
1 změnil soubory, kde provedl 11 přidání a 5 odebrání
  1. 11 5
      SE/se-lib/Route/WfsBiAudit.php

+ 11 - 5
SE/se-lib/Route/WfsBiAudit.php

@@ -4,7 +4,7 @@ Lib::loadClass('RouteBase');
 
 class Route_WfsBiAudit extends RouteBase {
 
-	const maxResolveDepth = 3;
+	const maxResolveDepth = 6;
 	private $dom, $path = [], $relations = [], $tablesUsed = [];
 	public $_wfsRootNode = null;
 	public $_xmlnsTablePrefix = [];
@@ -90,7 +90,12 @@ public function objectStructView($item) {
 		return $return;
 
 	}
-
+	
+	private function AddChildComment($node,$value = null) { //$node, $name, 
+		$child = $this->dom->createComment($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, " #320 TODO 'jest tak/{$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," #323 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," #330 TODO: " . var_export($value, true) . " ");
 				}
 			}
 
@@ -401,6 +406,7 @@ public function objectStructView($item) {
 				'xmlns:gml' => 'http://www.opengis.net/gml',
 				'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
 				'xmlns:xlink' => 'http://www.w3.org/1999/xlink',
+				'xmlns:p5'    => 'https://biuro.biall-net.pl/wfs'
 			];
 
 			$wfs = $this->addChild($this->dom, 'wfs:FeatureCollection');