public function populate($data) { if (is_null($this->_busunit)) { $this->_busunit = new Busunit_Model_Busunit(); } Agana_Data_BeanUtil::populate($this->_busunit, $data); if (isset($data['id'])) { $this->_busunit->setId($data['id']); } if (isset($data['city_id'])) { $dc = new Location_Domain_City(); $c = $dc->getById($data['city_id']); $this->_busunit->setCity($c); } }
public function populate($data) { if (isset($data['id'])) { $this->_region->setId($data['id']); } $this->_region->setName($data['name']); if (isset($data['city_id'])) { $dc = new Location_Domain_City(); $c = $dc->getById($data['city_id']); $this->_region->setCity($c); $this->_region->setCity_id($data['city_id']); } if (isset($data['parent_id'])) { if (is_numeric($data['parent_id'])) { $dc = new Location_Domain_CityRegion(); $c = $dc->getById($data['parent_id']); $this->_region->setParent($c); $this->_region->setParent_id($data['parent_id']); } } }
public function getBornCity() { if (!$this->bornCity) { $domain = new Location_Domain_City(); $this->bornCity = $domain->getById($this->born_city_id); } return $this->bornCity; }
public function getCity() { if (is_null($this->city_id) || !is_numeric($this->city_id)) { $this->city = new Location_Model_City(); } else { if (is_null($this->city)) { $domain = new Location_Domain_City(); $this->city = $domain->getById($this->city_id); } } return $this->city; }