ValidationRule.php 993 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Customer\Model\Data;
  7. use Magento\Customer\Api\Data\ValidationRuleInterface;
  8. class ValidationRule extends \Magento\Framework\Api\AbstractSimpleObject implements
  9. \Magento\Customer\Api\Data\ValidationRuleInterface
  10. {
  11. /**
  12. * {@inheritdoc}
  13. */
  14. public function getName()
  15. {
  16. return $this->_get(self::NAME);
  17. }
  18. /**
  19. * {@inheritdoc}
  20. */
  21. public function getValue()
  22. {
  23. return $this->_get(self::VALUE);
  24. }
  25. /**
  26. * Set validation rule name
  27. *
  28. * @param string $name
  29. * @return $this
  30. */
  31. public function setName($name)
  32. {
  33. return $this->setData(self::NAME, $name);
  34. }
  35. /**
  36. * Set validation rule value
  37. *
  38. * @param string $value
  39. * @return $this
  40. */
  41. public function setValue($value)
  42. {
  43. return $this->setData(self::VALUE, $value);
  44. }
  45. }