Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / orm / tests / Doctrine / Tests / Models / Legacy / LegacyCar.php
1 <?php
2
3 namespace Doctrine\Tests\Models\Legacy;
4
5 use Doctrine\Common\Collections\ArrayCollection;
6
7 /**
8  * @Entity
9  * @Table(name="legacy_cars")
10  */
11 class LegacyCar
12 {
13     /**
14      * @Id
15      * @GeneratedValue
16      * @Column(name="iCarId", type="integer", nullable=false)
17      */
18     public $_id;
19     /**
20      * @ManyToMany(targetEntity="LegacyUser", mappedBy="_cars")
21      */
22     public $_users;
23
24     /**
25      * @Column(name="sDescription", type="string", length=255, unique=true)
26      */
27     public $_description;
28
29     function getDescription()
30     {
31         return $this->_description;
32     }
33
34     public function addUser(LegacyUser $user) {
35         $this->_users[] = $user;
36     }
37
38     public function getUsers() {
39         return $this->_users;
40     }
41 }