Rajout de doctrine/orm
[zf2.biz/application_blanche.git] / vendor / doctrine / orm / tests / Doctrine / Tests / Models / DDC964 / DDC964Group.php
diff --git a/vendor/doctrine/orm/tests/Doctrine/Tests/Models/DDC964/DDC964Group.php b/vendor/doctrine/orm/tests/Doctrine/Tests/Models/DDC964/DDC964Group.php
new file mode 100644 (file)
index 0000000..5260409
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+
+namespace Doctrine\Tests\Models\DDC964;
+
+use Doctrine\Common\Collections\ArrayCollection;
+
+/**
+ * @Entity
+ */
+class DDC964Group
+{
+
+    /**
+     * @GeneratedValue
+     * @Id @Column(type="integer")
+     */
+    private $id;
+
+    /**
+     * @Column
+     */
+    private $name;
+
+    /**
+     * @ArrayCollection
+     * 
+     * @ManyToMany(targetEntity="DDC964User", mappedBy="groups")
+     */
+    private $users;
+
+    public function __construct($name = null)
+    {
+        $this->name = $name;
+        $this->users = new ArrayCollection();
+    }
+
+    /**
+     * @param string $name
+     */
+    public function setName($name)
+    {
+        $this->name = $name;
+    }
+
+    /**
+     * @return string
+     */
+    public function getName()
+    {
+        return $this->name;
+    }
+
+    /**
+     * @param DDC964User $user
+     */
+    public function addUser(DDC964User $user)
+    {
+        $this->users[] = $user;
+    }
+
+    /**
+     * @return ArrayCollection
+     */
+    public function getUsers()
+    {
+        return $this->users;
+    }
+
+}
+