Skip to content

Commit

Permalink
Merge pull request #8170 from kenjis/docs-getVar-not-recommened
Browse files Browse the repository at this point in the history
docs: fix incomingrequest.rst and note to getVar()
  • Loading branch information
kenjis authored Nov 9, 2023
2 parents 71e1e43 + b887113 commit dc911c0
Show file tree
Hide file tree
Showing 14 changed files with 126 additions and 87 deletions.
173 changes: 106 additions & 67 deletions user_guide_src/source/incoming/incomingrequest.rst

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion user_guide_src/source/incoming/incomingrequest/008.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php

$something = $request->getVar('foo');
$something = $request->getPost('foo');
4 changes: 2 additions & 2 deletions user_guide_src/source/incoming/incomingrequest/010.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
* }
*/

$data = $request->getVar('foo');
$data = $request->getJsonVar('foo');
// $data = "bar"

$data = $request->getVar('fizz.buzz');
$data = $request->getJsonVar('fizz.buzz');
// $data = "baz"
2 changes: 1 addition & 1 deletion user_guide_src/source/incoming/incomingrequest/014.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php

$email = $request->getVar('email', FILTER_SANITIZE_EMAIL);
$email = $request->getPost('email', FILTER_SANITIZE_EMAIL);
3 changes: 0 additions & 3 deletions user_guide_src/source/incoming/incomingrequest/027.php

This file was deleted.

3 changes: 0 additions & 3 deletions user_guide_src/source/incoming/incomingrequest/028.php

This file was deleted.

4 changes: 0 additions & 4 deletions user_guide_src/source/incoming/incomingrequest/029.php

This file was deleted.

3 changes: 0 additions & 3 deletions user_guide_src/source/incoming/incomingrequest/030.php

This file was deleted.

3 changes: 0 additions & 3 deletions user_guide_src/source/incoming/incomingrequest/031.php

This file was deleted.

3 changes: 3 additions & 0 deletions user_guide_src/source/incoming/incomingrequest/041.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

$request->getGet('some_data');
3 changes: 3 additions & 0 deletions user_guide_src/source/incoming/incomingrequest/042.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

$request->getGet('some_data', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
4 changes: 4 additions & 0 deletions user_guide_src/source/incoming/incomingrequest/043.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php

$request->getGet(null, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
// returns all GET items with string sanitation
3 changes: 3 additions & 0 deletions user_guide_src/source/incoming/incomingrequest/044.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

$request->getGet(['field1', 'field2']);
3 changes: 3 additions & 0 deletions user_guide_src/source/incoming/incomingrequest/045.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

$request->getGet(['field1', 'field2'], FILTER_SANITIZE_FULL_SPECIAL_CHARS);

0 comments on commit dc911c0

Please sign in to comment.