summaryrefslogtreecommitdiffstats
path: root/codebase/MixedConnector.php
diff options
context:
space:
mode:
authorKirylka <kirylanoshko@gmail.com>2015-03-31 17:56:47 +0300
committerKirylka <kirylanoshko@gmail.com>2015-03-31 17:56:47 +0300
commitf5f99c335707d9b11d40f1eb0f6ddb5a993fd31a (patch)
treed9c0d3532ec9f0f2fb68e31d2611282ae0642181 /codebase/MixedConnector.php
parent458f0aead573842f1df00ce2ae00334c27f66585 (diff)
downloadconnector-php-f5f99c335707d9b11d40f1eb0f6ddb5a993fd31a.zip
connector-php-f5f99c335707d9b11d40f1eb0f6ddb5a993fd31a.tar.gz
connector-php-f5f99c335707d9b11d40f1eb0f6ddb5a993fd31a.tar.bz2
Creating a new connector for yii2.
Diffstat (limited to 'codebase/MixedConnector.php')
-rw-r--r--codebase/MixedConnector.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/codebase/MixedConnector.php b/codebase/MixedConnector.php
new file mode 100644
index 0000000..898bfa9
--- /dev/null
+++ b/codebase/MixedConnector.php
@@ -0,0 +1,24 @@
+<?php
+namespace DHTMLX\Connector;
+
+use DHTMLX\Connector\Connector;
+
+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