/** * singleton getter * * @param void * @return PApps */ public static function get() { if (!isset(self::$_instance)) { $c = __CLASS__; self::$_instance = new $c(); } return self::$_instance; }
/** * @return select-option box with all the countries */ private function getAllCountriesSelectOption() { $countries = MOD_geo::get()->getAllCountries(); $out = "<select name=\"country\">\n"; foreach ($countries as $countryId => $country) { $out .= '<option value="' . $countryId . '">' . $country . "</option>\n"; } $out .= "</select>\n"; $geonames = MOD_geonames::get(); // get the singleton instance $id = $geonames->getUpdate(); return $out; }