Mono.php 826 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * This file is part of the PHPExiftool package.
  4. *
  5. * (c) Alchemy <support@alchemy.fr>
  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 PHPExiftool\Driver\Value;
  11. class Mono implements ValueInterface
  12. {
  13. protected $value;
  14. public function __construct($value)
  15. {
  16. $this->set($value);
  17. }
  18. public function getType()
  19. {
  20. return self::TYPE_MONO;
  21. }
  22. public function set($value)
  23. {
  24. $this->value = (string) $value;
  25. return $this;
  26. }
  27. public function asString()
  28. {
  29. return $this->value;
  30. }
  31. public function asArray()
  32. {
  33. return (array) $this->value;
  34. }
  35. public function __toString()
  36. {
  37. return $this->value;
  38. }
  39. }