Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / orm / tests / Doctrine / Tests / Models / DDC117 / DDC117ArticleDetails.php
1 <?php
2
3 namespace Doctrine\Tests\Models\DDC117;
4
5 /**
6  * @Entity
7  */
8 class DDC117ArticleDetails
9 {
10     /**
11      * @Id
12      * @OneToOne(targetEntity="DDC117Article", inversedBy="details")
13      * @JoinColumn(name="article_id", referencedColumnName="article_id")
14      */
15     private $article;
16
17     /**
18      * @Column(type="text")
19      */
20     private $text;
21
22     public function __construct($article, $text)
23     {
24         $this->article = $article;
25         $article->setDetails($this);
26
27         $this->update($text);
28     }
29
30     public function update($text)
31     {
32         $this->text = $text;
33     }
34
35     public function getText()
36     {
37         return $this->text;
38     }
39 }