1 | <?php |
||
14 | class VehicleRepository implements VehicleRepositoryInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var ObjectManager |
||
18 | */ |
||
19 | private $em; |
||
20 | |||
21 | /** |
||
22 | * @param ObjectManager $em |
||
23 | */ |
||
24 | public function __construct(ObjectManager $em) |
||
28 | |||
29 | /** |
||
30 | * @param Person $person |
||
31 | * @return array |
||
32 | */ |
||
33 | public function findByPerson(Person $person): array |
||
49 | |||
50 | /** |
||
51 | * @param VehiclesQuery $query |
||
52 | * @return array |
||
53 | */ |
||
54 | public function findAll(VehiclesQuery $query): array |
||
101 | |||
102 | /** |
||
103 | * @param string $id |
||
104 | * @return Car|null |
||
105 | * @throws \Doctrine\ORM\NonUniqueResultException |
||
106 | */ |
||
107 | public function find(string $id): ?VehicleInterface |
||
120 | |||
121 | /** |
||
122 | * @param VehicleInterface $vehicle |
||
123 | * @return VehicleInterface |
||
124 | */ |
||
125 | public function save(VehicleInterface $vehicle): VehicleInterface |
||
132 | |||
133 | /** |
||
134 | * @param VehicleInterface $vehicle |
||
135 | */ |
||
136 | public function delete(VehicleInterface $vehicle): void |
||
141 | |||
142 | /** |
||
143 | * @return EntityRepository |
||
144 | */ |
||
145 | protected function getRepository(): EntityRepository |
||
149 | } |
||
150 |