summaryrefslogtreecommitdiffstats
path: root/codebase/Dhtmlx/Connector/MixedConnector.php
diff options
context:
space:
mode:
authorEgor <egor.26.93@gmail.com>2015-06-11 16:01:20 +0300
committerEgor <egor.26.93@gmail.com>2015-06-11 16:01:20 +0300
commit5992398183bf84c87dd4315d1532d10022718e9b (patch)
treec192dec5f76a7875265659d42dc2a5be22fc319b /codebase/Dhtmlx/Connector/MixedConnector.php
parent388e84730286a153c12a77d9f19215f2b74c5c4f (diff)
downloadconnector-php-5992398183bf84c87dd4315d1532d10022718e9b.zip
connector-php-5992398183bf84c87dd4315d1532d10022718e9b.tar.gz
connector-php-5992398183bf84c87dd4315d1532d10022718e9b.tar.bz2
Changed psr-4 structure to psr-0. Added connectors for phpcake, codeigniter frameworks.
Diffstat (limited to 'codebase/Dhtmlx/Connector/MixedConnector.php')
-rw-r--r--codebase/Dhtmlx/Connector/MixedConnector.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/codebase/Dhtmlx/Connector/MixedConnector.php b/codebase/Dhtmlx/Connector/MixedConnector.php
new file mode 100644
index 0000000..898bfa9
--- /dev/null
+++ b/codebase/Dhtmlx/Connector/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