/webtrees/tests/app/ |
H A D | ValidatorTest.php | 33 $request = $this->createMock(ServerRequestInterface::class); 34 $request 38 self::assertSame('test', Validator::attributes($request)->string('param')); 43 $request = $this->createMock(ServerRequestInterface::class); 44 $request 48 self::assertSame('test', Validator::parsedBody($request)->string('param')); 53 $request = $this->createMock(ServerRequestInterface::class); 54 $request 58 self::assertSame('test', Validator::queryParams($request)->string('param')); 63 $request = $this->createMock(ServerRequestInterface::class); [all …]
|
/webtrees/app/Http/RequestHandlers/ |
H A D | TreePreferencesAction.php | 46 * @param ServerRequestInterface $request 50 public function handle(ServerRequestInterface $request): ResponseInterface argument 52 $tree = Validator::attributes($request)->tree(); 56 $calendar_format_0 = Validator::parsedBody($request)->string('CALENDAR_FORMAT0'); 57 $calendar_format_1 = Validator::parsedBody($request)->string('CALENDAR_FORMAT1'); 59 $chart_box_tags = Validator::parsedBody($request)->array('CHART_BOX_TAGS'); 60 … $contact_user_id = Validator::parsedBody($request)->integer('CONTACT_USER_ID', 0); 61 $expand_notes = Validator::parsedBody($request)->boolean('EXPAND_NOTES'); 62 $expand_sources = Validator::parsedBody($request)->boolean('EXPAND_SOURCES'); 63 $fam_facts_quick = Validator::parsedBody($request)->array('FAM_FACTS_QUICK'); [all …]
|
H A D | UserEditAction.php | 66 * @param ServerRequestInterface $request 70 public function handle(ServerRequestInterface $request): ResponseInterface argument 72 $user = Validator::attributes($request)->user(); 73 $user_id = Validator::parsedBody($request)->integer('user_id'); 74 $username = Validator::parsedBody($request)->string('username'); 75 $real_name = Validator::parsedBody($request)->string('real_name'); 76 $email = Validator::parsedBody($request)->string('email'); 77 $password = Validator::parsedBody($request)->string('password'); 78 $theme = Validator::parsedBody($request)->string('theme'); 79 $language = Validator::parsedBody($request)->string('language'); [all …]
|
H A D | EmailPreferencesAction.php | 52 * @param ServerRequestInterface $request 56 public function handle(ServerRequestInterface $request): ResponseInterface argument 58 $user = Validator::attributes($request)->user(); 59 $active = Validator::parsedBody($request)->string('SMTP_ACTIVE'); 60 $disp_name = Validator::parsedBody($request)->string('SMTP_DISP_NAME'); 61 $from_name = Validator::parsedBody($request)->string('SMTP_FROM_NAME'); 62 $host = Validator::parsedBody($request)->string('SMTP_HOST'); 63 $port = Validator::parsedBody($request)->string('SMTP_PORT'); 64 $auth = Validator::parsedBody($request)->string('SMTP_AUTH'); 65 $auth_user = Validator::parsedBody($request)->string('SMTP_AUTH_USER'); [all …]
|
H A D | TreePrivacyAction.php | 41 * @param ServerRequestInterface $request 45 public function handle(ServerRequestInterface $request): ResponseInterface argument 47 $tree = Validator::attributes($request)->tree(); 49 $delete_default_resn_id = Validator::parsedBody($request)->array('delete'); 55 $xrefs = Validator::parsedBody($request)->array('xref'); 56 $tag_types = Validator::parsedBody($request)->array('tag_type'); 57 $resns = Validator::parsedBody($request)->array('resn'); 108 $hide_live_people = Validator::parsedBody($request)->string('HIDE_LIVE_PEOPLE'); 109 …$keep_alive_years_birth = Validator::parsedBody($request)->integer('KEEP_ALIVE_YEARS_BIRTH', 0… 110 …$keep_alive_years_death = Validator::parsedBody($request)->integer('KEEP_ALIVE_YEARS_DEATH', 0… [all …]
|
/webtrees/app/Http/Middleware/ |
H A D | HandleExceptions.php | 70 * @param ServerRequestInterface $request 76 …public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): Respon… argument 89 return $handler->handle($request); 93 $request = Registry::container()->get(ServerRequestInterface::class); 95 Registry::container()->set(ServerRequestInterface::class, $request); 98 return $this->httpExceptionResponse($request, $exception); 101 $request = Registry::container()->get(ServerRequestInterface::class) ?? $request; 103 return $this->thirdPartyExceptionResponse($request, $exception); 113 $request = Registry::container()->get(ServerRequestInterface::class); 118 return $this->unhandledExceptionResponse($request, $exception); [all …]
|
H A D | Router.php | 70 * @param ServerRequestInterface $request 75 …public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): Respon… argument 78 $url_route = Validator::queryParams($request)->string('route', ''); 80 if (Validator::attributes($request)->boolean('rewrite_urls', false)) { 83 $uri = $request->getUri() 85 ->withQuery(explode('&', $request->getUri()->getQuery(), 2)[1] ?? ''); 92 $pretty = $request; 95 $uri = $request->getUri()->withPath($url_route); 96 $pretty = $request->withUri($uri); 120 return $handler->handle($request); [all …]
|
H A D | UseDatabase.php | 39 * @param ServerRequestInterface $request 44 …public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): Respon… argument 47 driver: Validator::attributes($request)->string('dbtype', DB::MYSQL), 48 host: Validator::attributes($request)->string('dbhost'), 49 port: Validator::attributes($request)->string('dbport'), 50 database: Validator::attributes($request)->string('dbname'), 51 username: Validator::attributes($request)->string('dbuser'), 52 password: Validator::attributes($request)->string('dbpass'), 53 prefix: Validator::attributes($request)->string('tblpfx'), 54 key: Validator::attributes($request)->string('dbkey', ''), [all …]
|
/webtrees/app/Module/ |
H A D | ClippingsCartModule.php | 135 $request = Registry::container()->get(ServerRequestInterface::class); variable in Fisharebest\\Webtrees\\Module\\ClippingsCartModule 136 $route = Validator::attributes($request)->route(); 197 public function getDownloadFormAction(ServerRequestInterface $request): ResponseInterface argument 199 $tree = Validator::attributes($request)->tree(); 217 public function postDownloadAction(ServerRequestInterface $request): ResponseInterface argument 219 $tree = Validator::attributes($request)->tree(); 231 $filename = Validator::parsedBody($request)->string('filename'); 232 …$format = Validator::parsedBody($request)->isInArray(['gedcom', 'zip', 'zipmedia', 'gedzip']… 233 … $privacy = Validator::parsedBody($request)->isInArray($privacy_options)->string('privacy'); 234 …$encoding = Validator::parsedBody($request)->isInArray([UTF8::NAME, UTF16BE::NAME, ANSEL::NAME… [all …]
|
H A D | StoriesModule.php | 203 * @param ServerRequestInterface $request 207 public function getAdminAction(ServerRequestInterface $request): ResponseInterface argument 212 $tree = Validator::attributes($request)->treeOptional(); 251 * @param ServerRequestInterface $request 255 public function postAdminAction(ServerRequestInterface $request): ResponseInterface argument 260 'tree' => Validator::parsedBody($request)->string('tree'), 265 * @param ServerRequestInterface $request 269 public function getAdminEditAction(ServerRequestInterface $request): ResponseInterface argument 273 $tree = Validator::attributes($request)->tree(); 274 $block_id = Validator::queryParams($request)->integer('block_id', 0); [all …]
|
H A D | FrequentlyAskedQuestionsModule.php | 110 * @param ServerRequestInterface $request 114 public function getAdminAction(ServerRequestInterface $request): ResponseInterface argument 119 $tree = Validator::attributes($request)->treeOptional(); 168 * @param ServerRequestInterface $request 172 public function postAdminAction(ServerRequestInterface $request): ResponseInterface argument 177 'tree' => Validator::parsedBody($request)->string('tree'), 182 * @param ServerRequestInterface $request 186 public function postAdminDeleteAction(ServerRequestInterface $request): ResponseInterface argument 188 $block_id = Validator::queryParams($request)->integer('block_id'); 203 * @param ServerRequestInterface $request [all …]
|
H A D | HourglassChartModule.php | 140 * @param ServerRequestInterface $request 144 public function handle(ServerRequestInterface $request): ResponseInterface argument 146 $tree = Validator::attributes($request)->tree(); 147 $xref = Validator::attributes($request)->isXref()->string('xref'); 148 $user = Validator::attributes($request)->user(); 149 …$generations = Validator::attributes($request)->isBetween(self::MINIMUM_GENERATIONS, self::MAXIMUM… 150 $spouses = Validator::attributes($request)->boolean('spouses', self::DEFAULT_SPOUSES); 151 $ajax = Validator::queryParams($request)->boolean('ajax', false); 154 if ($request->getMethod() === RequestMethodInterface::METHOD_POST) { 157 'xref' => Validator::parsedBody($request)->isXref()->string('xref'), [all …]
|
H A D | ContactsFooterModule.php | 77 * @param ServerRequestInterface $request 81 public function getFooter(ServerRequestInterface $request): string argument 83 $tree = Validator::attributes($request)->treeOptional(); 94 'contact_links' => $this->contactLinkEverything($contact_user, $request), 100 …s->contactLinkGenealogy($contact_user, $request) . '<br>' . $this->contactLinkTechnical($webmaster… 106 'contact_links' => $this->contactLinkGenealogy($contact_user, $request), 112 'contact_links' => $this->contactLinkTechnical($webmaster_user, $request), 123 * @param ServerRequestInterface $request 127 public function contactLinkEverything(User $user, ServerRequestInterface $request): string argument 129 …al support or genealogy questions contact %s.', $this->user_service->contactLink($user, $request)); [all …]
|
H A D | InteractiveTreeModule.php | 176 * @param ServerRequestInterface $request 180 public function getChartAction(ServerRequestInterface $request): ResponseInterface argument 182 $tree = Validator::attributes($request)->tree(); 183 $user = Validator::attributes($request)->user(); 184 $xref = Validator::queryParams($request)->isXref()->string('xref'); 206 * @param ServerRequestInterface $request 210 public function postChartAction(ServerRequestInterface $request): ResponseInterface argument 215 'tree' => Validator::attributes($request)->tree()->name(), 216 'xref' => Validator::parsedBody($request)->isXref()->string('xref'), 221 * @param ServerRequestInterface $request [all …]
|
H A D | SlideShowModule.php | 85 $request = Registry::container()->get(ServerRequestInterface::class); 89 $start = Validator::queryParams($request)->boolean('start', $default_start); 237 * @param ServerRequestInterface $request 242 public function saveBlockConfiguration(ServerRequestInterface $request, int $block_id): void argument 244 … $this->setBlockSetting($block_id, 'filter', Validator::parsedBody($request)->string('filter')); 245 …$this->setBlockSetting($block_id, 'controls', Validator::parsedBody($request)->string('controls')); 246 … $this->setBlockSetting($block_id, 'start', Validator::parsedBody($request)->string('start')); 247 …trtolower(SourceMediaType::VALUE_AUDIO), (string) Validator::parsedBody($request)->boolean(SourceM… 248 …strtolower(SourceMediaType::VALUE_BOOK), (string) Validator::parsedBody($request)->boolean(SourceM… 249 …strtolower(SourceMediaType::VALUE_CARD), (string) Validator::parsedBody($request)->boolean(SourceM… [all …]
|
H A D | FamilyTreeStatisticsModule.php | 233 * @param ServerRequestInterface $request 238 public function saveBlockConfiguration(ServerRequestInterface $request, int $block_id): void argument 240 $show_last_update = Validator::parsedBody($request)->boolean('show_last_update', false); 241 … $show_common_surnames = Validator::parsedBody($request)->boolean('show_common_surnames', false); 242 $number_of_surnames = Validator::parsedBody($request)->integer('number_of_surnames'); 243 $stat_indi = Validator::parsedBody($request)->boolean('stat_indi', false); 244 $stat_fam = Validator::parsedBody($request)->boolean('stat_fam', false); 245 $stat_sour = Validator::parsedBody($request)->boolean('stat_sour', false); 246 $stat_other = Validator::parsedBody($request)->boolean('stat_other', false); 247 $stat_media = Validator::parsedBody($request)->boolean('stat_media', false); [all …]
|
H A D | MediaListModule.php | 140 * @param ServerRequestInterface $request 144 public function handle(ServerRequestInterface $request): ResponseInterface argument 146 $tree = Validator::attributes($request)->tree(); 147 $user = Validator::attributes($request)->user(); 154 if ($request->getMethod() === RequestMethodInterface::METHOD_POST) { 157 'page' => Validator::parsedBody($request)->integer('page'), 158 'max' => Validator::parsedBody($request)->integer('max'), 159 'folder' => Validator::parsedBody($request)->string('folder'), 160 'filter' => Validator::parsedBody($request)->string('filter'), 161 'subdirs' => Validator::parsedBody($request)->boolean('subdirs', false), [all …]
|
H A D | StatisticsChartModule.php | 127 * @param ServerRequestInterface $request 131 public function getChartAction(ServerRequestInterface $request): ResponseInterface argument 133 $tree = Validator::attributes($request)->tree(); 134 $user = Validator::attributes($request)->user(); 170 * @param ServerRequestInterface $request 174 public function getIndividualsAction(ServerRequestInterface $request): ResponseInterface argument 185 * @param ServerRequestInterface $request 189 public function getFamiliesAction(ServerRequestInterface $request): ResponseInterface argument 199 * @param ServerRequestInterface $request 203 public function getOtherAction(ServerRequestInterface $request): ResponseInterface argument [all …]
|
H A D | PedigreeMapModule.php | 170 * @param ServerRequestInterface $request 174 public function handle(ServerRequestInterface $request): ResponseInterface argument 176 $tree = Validator::attributes($request)->tree(); 177 $user = Validator::attributes($request)->user(); 178 …$generations = Validator::attributes($request)->isBetween(self::MINIMUM_GENERATIONS, self::MAXIMUM… 179 $xref = Validator::attributes($request)->isXref()->string('xref'); 182 if ($request->getMethod() === RequestMethodInterface::METHOD_POST) { 185 'xref' => Validator::parsedBody($request)->isXref()->string('xref'), 186 …'generations' => Validator::parsedBody($request)->isBetween(self::MINIMUM_GENERATIONS, self::MAXIM… 196 'data' => $this->getMapData($request), [all …]
|
H A D | CensusAssistantModule.php | 61 * @param ServerRequestInterface $request 65 public function postCensusHeaderAction(ServerRequestInterface $request): ResponseInterface argument 67 $census_class = Validator::parsedBody($request)->string('census'); 75 * @param ServerRequestInterface $request 79 public function postCensusIndividualAction(ServerRequestInterface $request): ResponseInterface argument 81 $tree = Validator::attributes($request)->tree(); 82 $indi_xref = Validator::parsedBody($request)->isXref()->string('xref', ''); 83 $head_xref = Validator::parsedBody($request)->isXref()->string('head', ''); 86 $census_class = Validator::parsedBody($request)->string('census'); 117 * @param ServerRequestInterface $request [all …]
|
H A D | FamilyBookChartModule.php | 137 * @param ServerRequestInterface $request 141 public function handle(ServerRequestInterface $request): ResponseInterface argument 143 $tree = Validator::attributes($request)->tree(); 144 $user = Validator::attributes($request)->user(); 145 $xref = Validator::attributes($request)->isXref()->string('xref'); 146 …$book_size = Validator::attributes($request)->isBetween(self::MINIMUM_BOOK_SIZE, self::MAXIMUM_B… 147 …$generations = Validator::attributes($request)->isBetween(self::MINIMUM_GENERATIONS, self::MAXIMUM… 148 $spouses = Validator::attributes($request)->boolean('spouses', false); 149 $ajax = Validator::queryParams($request)->boolean('ajax', false); 152 if ($request->getMethod() === RequestMethodInterface::METHOD_POST) { [all …]
|
/webtrees/tests/feature/ |
H A D | IndividualListTest.php | 72 …$request = self::createRequest(RequestMethodInterface::METHOD_GET, [], [], [], ['tree' => $this->… 73 $response = $module->handle($request); 79 …$request = self::createRequest(RequestMethodInterface::METHOD_GET, [], [], [], ['tree' => $this->… 80 $response = $module->handle($request); 86 …$request = self::createRequest(RequestMethodInterface::METHOD_GET, [], [], [], ['tree' => $this->… 87 $response = $module->handle($request); 98 …$request = self::createRequest(RequestMethodInterface::METHOD_GET, ['surname' => 'Muller'], [], [… 99 $response = $module->handle($request); 103 …$request = self::createRequest(RequestMethodInterface::METHOD_GET, ['surname' => 'MÜLLER'], [], [… 104 $response = $module->handle($request); [all …]
|
/webtrees/tests/app/Http/RequestHandlers/ |
H A D | UpgradeWizardStepTest.php | 51 $request = self::createRequest(RequestMethodInterface::METHOD_POST, ['step' => 'Invalid']); 53 $response = $handler->handle($request); 68 $request = self::createRequest(RequestMethodInterface::METHOD_POST, ['step' => 'Check']); 69 $response = $handler->handle($request); 86 $request = self::createRequest(RequestMethodInterface::METHOD_POST, ['step' => 'Check']); 87 $handler->handle($request); 102 $request = self::createRequest(RequestMethodInterface::METHOD_POST, ['step' => 'Check']); 103 $handler->handle($request); 114 $request = self::createRequest(RequestMethodInterface::METHOD_POST, ['step' => 'Prepare']); 115 $response = $handler->handle($request); [all …]
|
/webtrees/app/ |
H A D | Validator.php | 48 private ServerRequestInterface $request; variable in Fisharebest\\Webtrees\\Validator 55 * @param ServerRequestInterface $request 58 … private function __construct(array $parameters, ServerRequestInterface $request, string $encoding) argument 75 $this->request = $request; 79 * @param ServerRequestInterface $request 83 public static function attributes(ServerRequestInterface $request): self argument 85 return new self($request->getAttributes(), $request, 'UTF-8'); 89 * @param ServerRequestInterface $request 93 public static function parsedBody(ServerRequestInterface $request): self argument 95 return new self((array) $request->getParsedBody(), $request, 'UTF-8'); [all …]
|
/webtrees/app/Services/ |
H A D | DatatablesService.php | 43 * @param ServerRequestInterface $request Includes the datatables request parameters. 51 …public function handleCollection(ServerRequestInterface $request, Collection $collection, array $s… argument 53 $search = Validator::queryParams($request)->array('search')['value'] ?? ''; 54 $start = Validator::queryParams($request)->integer('start', 0); 55 $length = Validator::queryParams($request)->integer('length', 0); 56 $order = Validator::queryParams($request)->array('order'); 57 $draw = Validator::queryParams($request)->integer('draw', 0); 119 * @param ServerRequestInterface $request Includes the datatables request parameters. 127 …public function handleQuery(ServerRequestInterface $request, Builder $query, array $search_columns… argument 129 $search = Validator::queryParams($request)->array('search')['value'] ?? ''; [all …]
|