summaryrefslogtreecommitdiffstats
path: root/codebase/scheduler_connector.php
diff options
context:
space:
mode:
authorDmitry <dmitry@dhtmlx.com>2012-05-22 16:50:46 +0200
committerDmitry <dmitry@dhtmlx.com>2012-05-22 16:50:46 +0200
commitdff9912b9ee40fbac29c54b4cf67591e11b5e4cb (patch)
tree0129bc7f77c5098874ebffb6c6f52f381eda28b3 /codebase/scheduler_connector.php
parent2f3109a94c96af3cbaa8973407d27d072d489248 (diff)
downloadconnector-php-dff9912b9ee40fbac29c54b4cf67591e11b5e4cb.zip
connector-php-dff9912b9ee40fbac29c54b4cf67591e11b5e4cb.tar.gz
connector-php-dff9912b9ee40fbac29c54b4cf67591e11b5e4cb.tar.bz2
implements correct extending for fill_collections
Diffstat (limited to 'codebase/scheduler_connector.php')
-rw-r--r--codebase/scheduler_connector.php35
1 files changed, 5 insertions, 30 deletions
diff --git a/codebase/scheduler_connector.php b/codebase/scheduler_connector.php
index c70fc92..123d03b 100644
--- a/codebase/scheduler_connector.php
+++ b/codebase/scheduler_connector.php
@@ -51,31 +51,8 @@ class SchedulerConnector extends Connector{
}
$this->options[$name]=$options;
}
- /*! generates xml description for options collections
-
- @param list
- comma separated list of column names, for which options need to be generated
- */
- protected function fill_collections(){
- foreach ($this->options as $k=>$v) {
- $name = $k;
- $this->extra_output.="<coll_options for='{$name}'>";
- if (!is_string($this->options[$name]))
- $this->extra_output.=$this->options[$name]->render();
- else
- $this->extra_output.=$this->options[$name];
- $this->extra_output.="</coll_options>";
- }
- }
-
- /*! renders self as xml, ending part
- */
- protected function xml_end(){
- $this->fill_collections();
- return $this->extra_output."</data>";
- }
-
-
+
+
/*! constructor
Here initilization of all Masters occurs, execution timer initialized
@@ -176,13 +153,11 @@ class JSONSchedulerConnector extends SchedulerConnector {
protected function xml_end() {
$this->fill_collections();
- if (empty($this->extra_output))
- return ' }';
- else
- return ', "collections": {'.$this->extra_output.'} }';
+ $end = (!empty($this->extra_output)) ? ', "collections": {'.$this->extra_output.'}' : '';
+ $end .= '}';
+ return $end;
}
-
/*! assign options collection to the column
@param name