Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / orm / tests / Doctrine / Tests / Models / DDC117 / DDC117Translation.php
1 <?php
2
3 namespace Doctrine\Tests\Models\DDC117;
4
5 /**
6  * @Entity
7  */
8 class DDC117Translation
9 {
10     /**
11      * @Id
12      * @ManyToOne(targetEntity="DDC117Article", inversedBy="translations")
13      * @JoinColumn(name="article_id", referencedColumnName="article_id")
14      */
15     private $article;
16
17     /**
18      * @Id @column(type="string")
19      */
20     private $language;
21
22     /**
23      * @column(type="string")
24      */
25     private $title;
26
27     /**
28      * @ManyToMany(targetEntity="DDC117Editor", mappedBy="reviewingTranslations")
29      */
30     public $reviewedByEditors;
31
32     /**
33      * @OneToMany(targetEntity="DDC117Editor", mappedBy="lastTranslation")
34      */
35     public $lastTranslatedBy;
36
37     public function __construct($article, $language, $title)
38     {
39         $this->article = $article;
40         $this->language = $language;
41         $this->title = $title;
42         $this->reviewedByEditors = new \Doctrine\Common\Collections\ArrayCollection();
43         $this->lastTranslatedBy = new \Doctrine\Common\Collections\ArrayCollection();
44     }
45
46     public function getArticleId()
47     {
48         return $this->article->id();
49     }
50
51     public function getLanguage()
52     {
53         return $this->language;
54     }
55
56     public function getLastTranslatedBy()
57     {
58         return $this->lastTranslatedBy;
59     }
60
61     public function getReviewedByEditors()
62     {
63         return $this->reviewedByEditors;
64     }
65 }