summaryrefslogtreecommitdiffstats
path: root/codebase/connector/mixed_connector.php
diff options
context:
space:
mode:
Diffstat (limited to 'codebase/connector/mixed_connector.php')
-rw-r--r--codebase/connector/mixed_connector.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/codebase/connector/mixed_connector.php b/codebase/connector/mixed_connector.php
new file mode 100644
index 0000000..461d6ec
--- /dev/null
+++ b/codebase/connector/mixed_connector.php
@@ -0,0 +1,28 @@
+<?php
+/*
+ @author dhtmlx.com
+ @license GPL, see license.txt
+*/
+require_once("base_connector.php");
+
+class MixedConnector extends Connector {
+
+ protected $connectors = array();
+
+ public function add($name, $conn) {
+ $this->connectors[$name] = $conn;
+ }
+
+ public function render() {
+ $result = "{";
+ $parts = array();
+ foreach($this->connectors as $name => $conn) {
+ $conn->asString(true);
+ $parts[] = "\"".$name."\":".($conn->render())."\n";
+ }
+ $result .= implode(",\n", $parts)."}";
+ echo $result;
+ }
+}
+
+?> \ No newline at end of file