code: public function setCity($city)
      {
          if(!($city instanceof City)) {
              $city = new City((array)$city);
          }
          return $this->setParameter('city', $city);
      }
docs: Set city
  @param City|array $city
  @return $this