UniversalString.php 826 B

123456789101112131415161718192021222324252627282930313233343536
  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 UniversalString extends AbstractString
  14. {
  15. /**
  16. * Creates a new ASN.1 Universal String.
  17. * TODO The encodable characters of this type are not yet checked.
  18. *
  19. * @see http://en.wikipedia.org/wiki/Universal_Character_Set
  20. *
  21. * @param string $string
  22. */
  23. public function __construct($string)
  24. {
  25. $this->value = $string;
  26. $this->allowAll();
  27. }
  28. public function getType()
  29. {
  30. return Identifier::UNIVERSAL_STRING;
  31. }
  32. }