Vehicle.php 532 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Sluggable\Fixture\Inheritance2;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. /**
  6. * @ORM\Entity
  7. * @ORM\InheritanceType("JOINED")
  8. * @ORM\DiscriminatorColumn(name="discriment", type="string")
  9. * @ORM\DiscriminatorMap({"vehicle" = "Vehicle", "car" = "Car", "sport" = "SportCar"})
  10. */
  11. abstract class Vehicle
  12. {
  13. /**
  14. * @ORM\Id
  15. * @ORM\GeneratedValue
  16. * @ORM\Column(type="integer")
  17. */
  18. private $id;
  19. public function getId()
  20. {
  21. return $this->id;
  22. }
  23. }