123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace Tree\Fixture\Transport;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * @ORM\Entity
- * @ORM\InheritanceType("SINGLE_TABLE")
- * @ORM\DiscriminatorColumn(name="discriminator", type="string")
- * @ORM\DiscriminatorMap({
- * "vehicle" = "Vehicle",
- * "car" = "Car",
- * "bus" = "Bus"
- * })
- */
- class Vehicle
- {
- /**
- * @ORM\Id
- * @ORM\GeneratedValue
- * @ORM\Column(type="integer")
- */
- private $id;
- /**
- * @ORM\OneToOne(targetEntity="Engine")
- */
- private $engine;
- /**
- * @ORM\Column(length=128)
- */
- private $title;
- public function getId()
- {
- return $this->id;
- }
- public function setEngine(Engine $engine)
- {
- $this->engine = $engine;
- }
- public function getEngine()
- {
- return $this->engine;
- }
- public function setTitle($title)
- {
- $this->title = $title;
- }
- public function getTitle()
- {
- return $this->title;
- }
- }
|