fetch_data(); } protected function fetch_data() { $this->sticks_sheets = array(); $query = "select id_sticks_sheet from sticks_sheets"; $result = pmb_mysql_query($query); while($row = pmb_mysql_fetch_object($result)) { $this->sticks_sheets[] = new sticks_sheet($row->id_sticks_sheet); } } public function get_json_data() { $data = array(); foreach ($this->sticks_sheets as $sticks_sheet) { $data[$sticks_sheet->get_id()] = $sticks_sheet->get_data(); } return json_encode(encoding_normalize::utf8_normalize($data)); } public function get_display_options_selector($selected) { $options = ''; if(count($this->sticks_sheets)) { foreach($this->sticks_sheets as $sticks_sheet) { $options .= ""; if('stick_sheet_'.$sticks_sheet->get_id() == $selected) { $sticks_sheet->generate_globals(); } } } return $options; } }