123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?php
-
- namespace Doctrine\Tests\Models\Legacy;
-
- use Doctrine\Common\Collections\ArrayCollection;
-
-
- class LegacyUser
- {
-
-
- public $_id;
-
-
- public $_username;
-
-
- public $_name;
-
-
- public $_articles;
-
-
- public $_references;
-
-
- public $_cars;
- public function __construct() {
- $this->_articles = new ArrayCollection;
- $this->_references = new ArrayCollection;
- $this->_cars = new ArrayCollection;
- }
-
- public function getId() {
- return $this->_id;
- }
-
- public function getUsername() {
- return $this->_username;
- }
-
- public function addArticle(LegacyArticle $article) {
- $this->_articles[] = $article;
- $article->setAuthor($this);
- }
-
- public function addReference($reference)
- {
- $this->_references[] = $reference;
- }
-
- public function references()
- {
- return $this->_references;
- }
-
- public function addCar(LegacyCar $car) {
- $this->_cars[] = $car;
- $car->addUser($this);
- }
-
- public function getCars() {
- return $this->_cars;
- }
- }
|