示例#1
0
 public function toValue(Location $location, $type)
 {
     if ('photon' == $type) {
         $data = ["geometry" => ["coordinates" => $location->getCoordinates()->getCoordinates(), "type" => $location->getCoordinates()->getType()], "type" => "Feature", "properties" => ["country" => $location->getCountry(), "city" => $location->getCity(), "state" => $location->getRegion(), "postcode" => $location->getPostalcode()]];
         return $location->getCity() . '|' . Json::encode($data);
     } else {
         return $location->getCity() . ', ' . $location->getRegion();
     }
 }
示例#2
0
 /**
  * @testdox Allows setting and getting the email address
  */
 public function testSettingAndGettingTheCity()
 {
     $city = 'Frankfurt am Main';
     $this->target->setCity($city);
     $this->assertEquals($city, $this->target->getCity());
 }