Scope.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Model\Entity;
  7. /**
  8. * Class Scope
  9. */
  10. class Scope implements ScopeInterface
  11. {
  12. /**
  13. * @var string
  14. */
  15. private $identifier;
  16. /**
  17. * @var string
  18. */
  19. private $value;
  20. /**
  21. * @var string
  22. */
  23. private $fallback;
  24. /**
  25. * Scope constructor.
  26. *
  27. * @param string $identifier
  28. * @param string $value
  29. * @param ScopeInterface|null $fallback
  30. */
  31. public function __construct(
  32. $identifier,
  33. $value,
  34. ScopeInterface $fallback = null
  35. ) {
  36. $this->identifier = $identifier;
  37. $this->value = $value;
  38. $this->fallback = $fallback;
  39. }
  40. /**
  41. * @return string
  42. */
  43. public function getValue()
  44. {
  45. return $this->value;
  46. }
  47. /**
  48. * @return string
  49. */
  50. public function getIdentifier()
  51. {
  52. return $this->identifier;
  53. }
  54. /**
  55. * @return ScopeInterface
  56. */
  57. public function getFallback()
  58. {
  59. return $this->fallback;
  60. }
  61. }