SensitiveParameterValue.php 916 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Polyfill\Php82;
  11. /**
  12. * @author Tim Düsterhus <duesterhus@woltlab.com>
  13. *
  14. * @internal
  15. */
  16. class SensitiveParameterValue
  17. {
  18. private $value;
  19. public function __construct($value)
  20. {
  21. $this->value = $value;
  22. }
  23. public function getValue()
  24. {
  25. return $this->value;
  26. }
  27. public function __debugInfo(): array
  28. {
  29. return [];
  30. }
  31. public function __sleep(): array
  32. {
  33. throw new \Exception("Serialization of 'SensitiveParameterValue' is not allowed");
  34. }
  35. public function __wakeup(): void
  36. {
  37. throw new \Exception("Unserialization of 'SensitiveParameterValue' is not allowed");
  38. }
  39. }