示例#1
0
 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;
 }
示例#2
0
 private function _isNeededLocation(Application_Model_Geocoder_Location $location, $formattedAddress, $neededTypes)
 {
     return $this->_isNeededType($neededTypes, $location->getType()) && $this->_isUniqueName($location->getName(), $formattedAddress);
 }