AbstractKeyValuePair.php 947 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Search;
  7. class AbstractKeyValuePair
  8. {
  9. /**
  10. * Field name
  11. *
  12. * @var string
  13. */
  14. protected $name;
  15. /**
  16. * Field values
  17. *
  18. * @var mixed
  19. */
  20. protected $value;
  21. /**
  22. * @param string $name
  23. * @param mixed $value
  24. * @codeCoverageIgnore
  25. */
  26. public function __construct($name, $value)
  27. {
  28. $this->name = $name;
  29. $this->value = $value;
  30. }
  31. /**
  32. * Get field name
  33. *
  34. * @return string
  35. * @codeCoverageIgnore
  36. */
  37. public function getName()
  38. {
  39. return $this->name;
  40. }
  41. /**
  42. * Get field values
  43. *
  44. * @return mixed Return data in raw-formt. Must be escaped for using in sql
  45. * @codeCoverageIgnore
  46. */
  47. public function getValue()
  48. {
  49. return $this->value;
  50. }
  51. }