ValidationRule.php 957 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Eav\Model\Entity\Attribute;
  8. /**
  9. * @codeCoverageIgnore
  10. */
  11. class ValidationRule extends \Magento\Framework\Model\AbstractModel implements
  12. \Magento\Eav\Api\Data\AttributeValidationRuleInterface
  13. {
  14. /**
  15. * {@inheritdoc}
  16. */
  17. public function getKey()
  18. {
  19. return $this->getData(self::KEY);
  20. }
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public function getValue()
  25. {
  26. return $this->getData(self::VALUE);
  27. }
  28. /**
  29. * Set object key
  30. *
  31. * @param string $key
  32. * @return $this
  33. */
  34. public function setKey($key)
  35. {
  36. return $this->setData(self::KEY, $key);
  37. }
  38. /**
  39. * Set object value
  40. *
  41. * @param string $value
  42. * @return $this
  43. */
  44. public function setValue($value)
  45. {
  46. return $this->setData(self::VALUE, $value);
  47. }
  48. }