public function get_variants($name, $source) { $count = new DataRequestConfig($source); $count->set_fieldset("DISTINCT " . $this->escape_name($name) . " as value"); $sort = new SortInterface($source); $count->set_sort(null); for ($i = 0; $i < count($sort->rules); $i++) { if ($sort->rules[$i]['name'] == $name) { $count->set_sort($sort->rules[$i]['name'], $sort->rules[$i]['direction']); } } $count->set_limit(0, 0); return $this->select($count); }
public function get_variants($name, $source) { $count = new DataRequestConfig($source); $count->set_fieldset("DISTINCT " . $name . " as value"); $count->set_sort(null); $count->set_limit(0, 0); return $this->select($count); }