AttributeValueInterface.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php
  2. /*
  3. * This file is part of the Sylius package.
  4. *
  5. * (c); Paweł Jędrzejewski
  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 Sylius\Component\Attribute\Model;
  11. /**
  12. * Attribute value model.
  13. *
  14. * This model associates the attribute with its value on the object.
  15. *
  16. * @author Paweł Jędrzejewski <pawel@sylius.org>
  17. */
  18. interface AttributeValueInterface
  19. {
  20. /**
  21. * Get subject.
  22. *
  23. * @return AttributeSubjectInterface
  24. */
  25. public function getSubject();
  26. /**
  27. * Set subject.
  28. *
  29. * @param AttributeSubjectInterface|null $subject
  30. */
  31. public function setSubject(AttributeSubjectInterface $subject = null);
  32. /**
  33. * Get attribute.
  34. *
  35. * @return AttributeInterface
  36. */
  37. public function getAttribute();
  38. /**
  39. * Set attribute.
  40. *
  41. * @param AttributeInterface $attribute
  42. */
  43. public function setAttribute(AttributeInterface $attribute);
  44. /**
  45. * Get attribute value.
  46. *
  47. * @return mixed
  48. */
  49. public function getValue();
  50. /**
  51. * Set attribute value.
  52. *
  53. * @param mixed $value
  54. */
  55. public function setValue($value);
  56. /**
  57. * Proxy method to access the name from real attribute.
  58. *
  59. * @return string
  60. */
  61. public function getName();
  62. /**
  63. * Proxy method to access the presentation from real attribute.
  64. *
  65. * @return string
  66. */
  67. public function getPresentation();
  68. /**
  69. * The type of the attribute.
  70. *
  71. * @return string
  72. */
  73. public function getType();
  74. /**
  75. * Get attribute configuration.
  76. *
  77. * @return array
  78. */
  79. public function getConfiguration();
  80. }