Post.php 627 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace dokuwiki\Input;
  3. /**
  4. * Internal class used for $_POST access in dokuwiki\Input\Input class
  5. */
  6. class Post extends Input
  7. {
  8. /** @noinspection PhpMissingParentConstructorInspection
  9. * Initialize the $access array, remove subclass members
  10. */
  11. public function __construct()
  12. {
  13. $this->access = &$_POST;
  14. }
  15. /**
  16. * Sets a parameter in $_POST and $_REQUEST
  17. *
  18. * @param string $name Parameter name
  19. * @param mixed $value Value to set
  20. */
  21. public function set($name, $value)
  22. {
  23. parent::set($name, $value);
  24. $_REQUEST[$name] = $value;
  25. }
  26. }