diff options
author | Dmitry <dmitry@dhtmlx.com> | 2012-05-22 16:50:46 +0200 |
---|---|---|
committer | Dmitry <dmitry@dhtmlx.com> | 2012-05-22 16:50:46 +0200 |
commit | dff9912b9ee40fbac29c54b4cf67591e11b5e4cb (patch) | |
tree | 0129bc7f77c5098874ebffb6c6f52f381eda28b3 /codebase/scheduler_connector.php | |
parent | 2f3109a94c96af3cbaa8973407d27d072d489248 (diff) | |
download | connector-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.php | 35 |
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 |