Translation.php 1.5 KB

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