. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Http\RequestHandlers; use Fisharebest\Webtrees\Validator; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Server\RequestHandlerInterface; /** * Search for genealogy data */ class SearchPhoneticAction implements RequestHandlerInterface { /** * The standard search. * * @param ServerRequestInterface $request * * @return ResponseInterface */ public function handle(ServerRequestInterface $request): ResponseInterface { return redirect(route(SearchPhoneticPage::class, [ 'firstname' => Validator::parsedBody($request)->string('firstname'), 'lastname' => Validator::parsedBody($request)->string('lastname'), 'place' => Validator::parsedBody($request)->string('place'), 'search_trees' => Validator::parsedBody($request)->array('search_trees'), 'soundex' => Validator::parsedBody($request)->string('soundex'), 'tree' => Validator::attributes($request)->tree()->name(), ])); } }