VisibleString.php 748 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /*
  3. * This file is part of the PHPASN1 library.
  4. *
  5. * Copyright © Friedrich Große <friedrich.grosse@gmail.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 FG\ASN1\Universal;
  11. use FG\ASN1\AbstractString;
  12. use FG\ASN1\Identifier;
  13. class VisibleString extends AbstractString
  14. {
  15. /**
  16. * Creates a new ASN.1 Visible String.
  17. * TODO The encodable characters of this type are not yet checked.
  18. *
  19. * @param string $string
  20. */
  21. public function __construct($string)
  22. {
  23. $this->value = $string;
  24. $this->allowAll();
  25. }
  26. public function getType()
  27. {
  28. return Identifier::VISIBLE_STRING;
  29. }
  30. }