Exemple #1
0
 /**
  *
  * @param boolean $pReload
  * @return Zupal_Places_Cities
  */
 public static function getInstance($pReload = FALSE)
 {
     if ($pReload || is_null(self::$_Instance)) {
         // process
         self::$_Instance = new Zupal_Places_Cities(Zupal_Domain_Abstract::STUB);
     }
     return self::$_Instance;
 }
Exemple #2
0
 public function update_city()
 {
     if (!$this->city) {
         return new Zupal_Places_Cities(Zupal_Domain_Abstract::STUB);
     }
     $city = FALSE;
     if ($this->getCountry()->has_states() && $this->getState()->identity()) {
         $city = Zupal_Places_Cities::getInstance()->get_city($this->city, $this->getState()->identity(), $this->country_id, TRUE);
     } else {
         $city = Zupal_Places_Cities::getInstance()->get_city($this->city, null, $this->country_id, TRUE);
     }
     $this->city_id = $city->identity();
     return $city;
 }