AbstractTranslation.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <?php
  2. namespace Gedmo\Translatable\Document;
  3. /**
  4. * Gedmo\Translatable\Document\AbstractTranslation
  5. *
  6. * @MappedSuperclass
  7. */
  8. abstract class AbstractTranslation
  9. {
  10. /**
  11. * @var integer $id
  12. *
  13. * @Id
  14. */
  15. private $id;
  16. /**
  17. * @var string $locale
  18. *
  19. * @String
  20. */
  21. private $locale;
  22. /**
  23. * @var string $objectClass
  24. *
  25. * @String
  26. */
  27. private $objectClass;
  28. /**
  29. * @var string $field
  30. *
  31. * @String
  32. */
  33. private $field;
  34. /**
  35. * @var string $foreignKey
  36. *
  37. * @String(name="foreign_key")
  38. */
  39. private $foreignKey;
  40. /**
  41. * @var text $content
  42. *
  43. * @String
  44. */
  45. private $content;
  46. /**
  47. * Get id
  48. *
  49. * @return integer $id
  50. */
  51. public function getId()
  52. {
  53. return $this->id;
  54. }
  55. /**
  56. * Set locale
  57. *
  58. * @param string $locale
  59. * @return AbstractTranslation
  60. */
  61. public function setLocale($locale)
  62. {
  63. $this->locale = $locale;
  64. return $this;
  65. }
  66. /**
  67. * Get locale
  68. *
  69. * @return string $locale
  70. */
  71. public function getLocale()
  72. {
  73. return $this->locale;
  74. }
  75. /**
  76. * Set field
  77. *
  78. * @param string $field
  79. * @return AbstractTranslation
  80. */
  81. public function setField($field)
  82. {
  83. $this->field = $field;
  84. return $this;
  85. }
  86. /**
  87. * Get field
  88. *
  89. * @return string $field
  90. */
  91. public function getField()
  92. {
  93. return $this->field;
  94. }
  95. /**
  96. * Set object class
  97. *
  98. * @param string $objectClass
  99. * @return AbstractTranslation
  100. */
  101. public function setObjectClass($objectClass)
  102. {
  103. $this->objectClass = $objectClass;
  104. return $this;
  105. }
  106. /**
  107. * Get objectClass
  108. *
  109. * @return string $objectClass
  110. */
  111. public function getObjectClass()
  112. {
  113. return $this->objectClass;
  114. }
  115. /**
  116. * Set foreignKey
  117. *
  118. * @param string $foreignKey
  119. * @return AbstractTranslation
  120. */
  121. public function setForeignKey($foreignKey)
  122. {
  123. $this->foreignKey = $foreignKey;
  124. return $this;
  125. }
  126. /**
  127. * Get foreignKey
  128. *
  129. * @return string $foreignKey
  130. */
  131. public function getForeignKey()
  132. {
  133. return $this->foreignKey;
  134. }
  135. /**
  136. * Set content
  137. *
  138. * @param text $content
  139. * @return AbstractTranslation
  140. */
  141. public function setContent($content)
  142. {
  143. $this->content = $content;
  144. return $this;
  145. }
  146. /**
  147. * Get content
  148. *
  149. * @return text $content
  150. */
  151. public function getContent()
  152. {
  153. return $this->content;
  154. }
  155. }