protected function set_up($args) { $db = new Database($this->wpdb); $this->table = $db->getTable($args['table']); // Check that a point column exists. $points = $this->table->getColumns('point'); if (empty($points)) { // @TODO Show error. return; } $point_col = array_shift($points); $this->point_col_name = $point_col->getName(); // Apply filters. $filter_param = isset($args['filter']) ? $args['filter'] : array(); $this->table->addFilters($filter_param); $this->table->addFilter($this->point_col_name, 'not empty', ''); }