public function executeAddress($request) { if ($str = $request->getParameter('address_search')) { if ($this->address = AddressTable::parse($str)) { $page = $request->getParameter('page', 1); $num = $request->getParameter('num', 20); $q = $this->address->getNearbyAddressesQuery(0.2)->groupBy('e.id'); $this->results_pager = new Doctrine_Pager($q, $page, $num); } else { $request->setError('address_search_terms', 'The address you entered seems to be invalid'); } } }