protected function FetchResults(sfWebRequest $request, $by_period = false)
 {
     $this->city = Doctrine_Core::getTable('City')->FindByNameLike($request->getParameter('city'));
     $this->features = Doctrine_Core::getTable('Feature')->GetByIds($request->getParameter('features'));
     if ($by_period) {
         $apps = Doctrine_Core::getTable('Apartment')->getApartmentsByFeatures($request->getParameter('features'), $this->city->getId());
         $this->apps = Apartment::AvalibilityInPeriod($apps, $request->getParameter('date_from'), $request->getParameter('date_to'));
     } else {
         $this->apps = Doctrine_Core::getTable('Apartment')->getApartmentsByFeatures($request->getParameter('features'), $this->city->getId());
     }
 }