Rajout de doctrine/orm
[zf2.biz/application_blanche.git] / vendor / doctrine / orm / tests / Doctrine / Tests / Models / Legacy / LegacyCar.php
diff --git a/vendor/doctrine/orm/tests/Doctrine/Tests/Models/Legacy/LegacyCar.php b/vendor/doctrine/orm/tests/Doctrine/Tests/Models/Legacy/LegacyCar.php
new file mode 100644 (file)
index 0000000..ac38341
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+
+namespace Doctrine\Tests\Models\Legacy;
+
+use Doctrine\Common\Collections\ArrayCollection;
+
+/**
+ * @Entity
+ * @Table(name="legacy_cars")
+ */
+class LegacyCar
+{
+    /**
+     * @Id
+     * @GeneratedValue
+     * @Column(name="iCarId", type="integer", nullable=false)
+     */
+    public $_id;
+    /**
+     * @ManyToMany(targetEntity="LegacyUser", mappedBy="_cars")
+     */
+    public $_users;
+
+    /**
+     * @Column(name="sDescription", type="string", length=255, unique=true)
+     */
+    public $_description;
+
+    function getDescription()
+    {
+        return $this->_description;
+    }
+
+    public function addUser(LegacyUser $user) {
+        $this->_users[] = $user;
+    }
+
+    public function getUsers() {
+        return $this->_users;
+    }
+}