コード例 #1
0
ファイル: City.php プロジェクト: Rademade/MedOptima
 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
ファイル: Address.php プロジェクト: Rademade/MedOptima
 private function _isNeededLocation(Application_Model_Geocoder_Location $location, $formattedAddress, $neededTypes)
 {
     return $this->_isNeededType($neededTypes, $location->getType()) && $this->_isUniqueName($location->getName(), $formattedAddress);
 }