Beispiel #1
0
 /**
  * singleton getter
  * 
  * @param void
  * @return PApps
  */
 public static function get()
 {
     if (!isset(self::$_instance)) {
         $c = __CLASS__;
         self::$_instance = new $c();
     }
     return self::$_instance;
 }
Beispiel #2
0
 /**
  * @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;
 }