Option.php 641 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Constraint option
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Framework\Validator\Constraint;
  9. class Option implements \Magento\Framework\Validator\Constraint\OptionInterface
  10. {
  11. /**
  12. * @var int|string|array
  13. */
  14. protected $_value;
  15. /**
  16. * Set value
  17. *
  18. * @param int|string|array $value
  19. */
  20. public function __construct($value)
  21. {
  22. $this->_value = $value;
  23. }
  24. /**
  25. * Get value
  26. *
  27. * @return int|string|array
  28. */
  29. public function getValue()
  30. {
  31. return $this->_value;
  32. }
  33. }