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