Exemplo n.º 1
0
 protected function fill_collections($list = "")
 {
     $names = explode(",", $list);
     for ($i = 0; $i < sizeof($names); $i++) {
         $name = $this->resolve_parameter($names[$i]);
         if (!array_key_exists($name, $this->options)) {
             $this->options[$name] = new DistinctOptionsConnector($this->get_connection(), $this->names["db_class"]);
             $c = new DataConfig($this->config);
             $r = new DataRequestConfig($this->request);
             $c->minimize($name);
             $this->options[$name]->render_connector($c, $r);
         }
         $this->extra_output .= "<coll_options for='{$names[$i]}'>";
         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>";
     }
 }
Exemplo n.º 2
0
 protected function fill_collections($list)
 {
     $names = explode(",", $list);
     $options = array();
     for ($i = 0; $i < sizeof($names); $i++) {
         $name = $this->resolve_parameter($names[$i]);
         if (!array_key_exists($name, $this->options)) {
             $this->options[$name] = new JSONDistinctOptionsConnector($this->get_connection(), $this->names["db_class"]);
             $c = new DataConfig($this->config);
             $r = new DataRequestConfig($this->request);
             $c->minimize($name);
             $this->options[$name]->render_connector($c, $r);
         }
         $option = "\"{$name}\":[";
         if (!is_string($this->options[$name])) {
             $option .= substr($this->options[$name]->render(), 0, -2);
         } else {
             $option .= $this->options[$name];
         }
         $option .= "]";
         $options[] = $option;
     }
     $this->extra_output .= implode(",", $options);
 }