コード例 #1
0
 /**
  * Sets the location type
  *
  * @param string $locationType 
  */
 public function setLocationType($locationType)
 {
     if (in_array($locationType, GeocoderLocationType::getGeocoderLocationTypes())) {
         $this->locationType = $locationType;
     } else {
         throw new \InvalidArgumentException('The geocoder geometry location type can only be : ' . implode(', ', GeocoderLocationType::getGeocoderLocationTypes()));
     }
 }
コード例 #2
0
 /**
  * Checks the geocoder location types getter
  */
 public function testGeocoderLocationtypes()
 {
     $this->assertEquals(GeocoderLocationType::getGeocoderLocationTypes(), array(GeocoderLocationType::APPROXIMATE, GeocoderLocationType::GEOMETRIC_CENTER, GeocoderLocationType::RANGE_INTERPOLATED, GeocoderLocationType::ROOFTOP));
 }