Translation.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. namespace Gedmo\Translator;
  3. /**
  4. * Base translation class.
  5. *
  6. * @author Konstantin Kudryashov <ever.zet@gmail.com>
  7. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  8. */
  9. abstract class Translation implements TranslationInterface
  10. {
  11. protected $translatable;
  12. protected $locale;
  13. protected $property;
  14. protected $value;
  15. /**
  16. * Set translatable
  17. *
  18. * @param string $translatable
  19. */
  20. public function setTranslatable($translatable)
  21. {
  22. $this->translatable = $translatable;
  23. }
  24. /**
  25. * Get translatable
  26. *
  27. * @return string $translatable
  28. */
  29. public function getTranslatable()
  30. {
  31. return $this->translatable;
  32. }
  33. /**
  34. * Set locale
  35. *
  36. * @param string $locale
  37. */
  38. public function setLocale($locale)
  39. {
  40. $this->locale = $locale;
  41. }
  42. /**
  43. * Get locale
  44. *
  45. * @return string $locale
  46. */
  47. public function getLocale()
  48. {
  49. return $this->locale;
  50. }
  51. /**
  52. * Set property
  53. *
  54. * @param string $property
  55. */
  56. public function setProperty($property)
  57. {
  58. $this->property = $property;
  59. }
  60. /**
  61. * Get property
  62. *
  63. * @return string $field
  64. */
  65. public function getProperty()
  66. {
  67. return $this->property;
  68. }
  69. /**
  70. * Set value
  71. *
  72. * @param string $value
  73. * @return Translation
  74. */
  75. public function setValue($value)
  76. {
  77. $this->value = $value;
  78. return $this;
  79. }
  80. /**
  81. * Get value
  82. *
  83. * @return string $value
  84. */
  85. public function getValue()
  86. {
  87. return $this->value;
  88. }
  89. }