Translation.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace Gedmo\Translator\Document;
  3. use Gedmo\Translator\Translation as BaseTranslation;
  4. use Doctrine\ODM\MongoDB\Mapping\Annotations\MappedSuperclass;
  5. use Doctrine\ODM\MongoDB\Mapping\Annotations\Id;
  6. use Doctrine\ODM\MongoDB\Mapping\Annotations\String as MongoString;
  7. /**
  8. * Document translation class.
  9. *
  10. * @author Konstantin Kudryashov <ever.zet@gmail.com>
  11. * @link http://www.gediminasm.org
  12. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  13. *
  14. * @MappedSuperclass
  15. */
  16. abstract class Translation extends BaseTranslation
  17. {
  18. /**
  19. * @Id
  20. */
  21. protected $id;
  22. /**
  23. * @var string $locale
  24. *
  25. * @MongoString
  26. */
  27. protected $locale;
  28. /**
  29. * @var string $property
  30. *
  31. * @MongoString
  32. */
  33. protected $property;
  34. /**
  35. * @var text $value
  36. *
  37. * @MongoString
  38. */
  39. protected $value;
  40. /**
  41. * Get id
  42. *
  43. * @return integer $id
  44. */
  45. public function getId()
  46. {
  47. return $this->id;
  48. }
  49. }