/** * * @return Location_Model_City */ public function getCity() { if (is_null($this->city) && !is_null($this->city_id)) { $p = new Location_Persist_Dao_City(); $this->city = $p->get($this->city_id); } return $this->city; }
public function getByName($name) { try { $u = new Location_Persist_Dao_City(); return $u->getByName($name); } catch (Exception $e) { throw $e; } }