summaryrefslogtreecommitdiffstats
path: root/codebase/Dhtmlx/Connector/OptionsConnector.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/OptionsConnector.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/OptionsConnector.php')
-rw-r--r--codebase/Dhtmlx/Connector/OptionsConnector.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/codebase/Dhtmlx/Connector/OptionsConnector.php b/codebase/Dhtmlx/Connector/OptionsConnector.php
new file mode 100644
index 0000000..4c0ab16
--- /dev/null
+++ b/codebase/Dhtmlx/Connector/OptionsConnector.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace DHTMLX\Connector;
+
+/*! wrapper around options collection, used for comboboxes and filters
+**/
+class OptionsConnector extends Connector{
+ protected $init_flag=false;//!< used to prevent rendering while initialization
+ public function __construct($res,$type=false,$item_type=false,$data_type=false){
+ if (!$item_type) $item_type="DataItem";
+ if (!$data_type) $data_type=""; //has not sense, options not editable
+ parent::__construct($res,$type,$item_type,$data_type);
+ }
+ /*! render self
+ process commands, return data as XML, not output data to stdout, ignore parameters in incoming request
+ @return
+ data as XML string
+ */
+ public function render(){
+ if (!$this->init_flag){
+ $this->init_flag=true;
+ return "";
+ }
+ $res = $this->sql->select($this->request);
+ return $this->render_set($res);
+ }
+} \ No newline at end of file