/** * Retrieve detailled informations about one \databox * * @param \databox $databox * * @return array */ private function list_databox(\databox $databox) { return ['databox_id' => $databox->get_sbas_id(), 'name' => $databox->get_dbname(), 'viewname' => $databox->get_viewname(), 'labels' => ['en' => $databox->get_label('en'), 'de' => $databox->get_label('de'), 'fr' => $databox->get_label('fr'), 'nl' => $databox->get_label('nl')], 'version' => $databox->get_version()]; }
/** * Return unique integer key for a databox * * @param \databox $databox * @return int */ public function CRCdatabox(\databox $databox) { return sprintf("%u", crc32(str_replace(['.', '%'], '_', sprintf('%s_%s_%s_%s', $databox->get_host(), $databox->get_port(), $databox->get_user(), $databox->get_dbname())))); }
/** * Retrieve detailled informations about one databox * @param databox $databox * @return array */ protected function list_databox(databox $databox) { $ret = []; $ret['databox_id'] = $databox->get_sbas_id(); $ret['name'] = $databox->get_dbname(); $ret['viewname'] = $databox->get_viewname(); $ret['labels'] = ['en' => $databox->get_label('en'), 'de' => $databox->get_label('de'), 'fr' => $databox->get_label('fr'), 'nl' => $databox->get_label('nl')]; $ret['version'] = $databox->get_version(); return $ret; }