public function setLocation(Application_Model_Geocoder_Location $location) { if ($location->getType() !== Application_Model_Geocoder_Location::TYPE_LOCALITY) { throw new Exception('Wrong location type given'); } $this->_dataWorker->setValue('idLocation', $location->getId()); $this->_location = $location; }
private function _isNeededLocation(Application_Model_Geocoder_Location $location, $formattedAddress, $neededTypes) { return $this->_isNeededType($neededTypes, $location->getType()) && $this->_isUniqueName($location->getName(), $formattedAddress); }