Rajout de doctrine/orm
[zf2.biz/application_blanche.git] / vendor / doctrine / orm / tests / Doctrine / Tests / Models / DDC117 / DDC117ArticleDetails.php
diff --git a/vendor/doctrine/orm/tests/Doctrine/Tests/Models/DDC117/DDC117ArticleDetails.php b/vendor/doctrine/orm/tests/Doctrine/Tests/Models/DDC117/DDC117ArticleDetails.php
new file mode 100644 (file)
index 0000000..ae13df0
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+
+namespace Doctrine\Tests\Models\DDC117;
+
+/**
+ * @Entity
+ */
+class DDC117ArticleDetails
+{
+    /**
+     * @Id
+     * @OneToOne(targetEntity="DDC117Article", inversedBy="details")
+     * @JoinColumn(name="article_id", referencedColumnName="article_id")
+     */
+    private $article;
+
+    /**
+     * @Column(type="text")
+     */
+    private $text;
+
+    public function __construct($article, $text)
+    {
+        $this->article = $article;
+        $article->setDetails($this);
+
+        $this->update($text);
+    }
+
+    public function update($text)
+    {
+        $this->text = $text;
+    }
+
+    public function getText()
+    {
+        return $this->text;
+    }
+}
\ No newline at end of file