示例#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 URI
  */
 public function testSettingAndGettingPostalCode()
 {
     $postalCode = '60486';
     $this->target->setPostalcode($postalCode);
     $this->assertEquals($postalCode, $this->target->getPostalcode());
 }