1 | <?php |
||
12 | class VehicleResolver implements ResolverInterface, AliasedInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var TypeResolver |
||
16 | */ |
||
17 | private $typeResolver; |
||
18 | /** |
||
19 | * @var VehicleRepositoryInterface |
||
20 | */ |
||
21 | private $vehicleRepository; |
||
22 | |||
23 | /** |
||
24 | * @param TypeResolver $typeResolver |
||
25 | * @param VehicleRepositoryInterface $vehicleRepository |
||
26 | */ |
||
27 | public function __construct(TypeResolver $typeResolver, VehicleRepositoryInterface $vehicleRepository) |
||
32 | |||
33 | /** |
||
34 | * @param VehicleInterface $vehicle |
||
35 | * @return null|string |
||
36 | * @throws \ReflectionException |
||
37 | */ |
||
38 | public function resolveType(VehicleInterface $vehicle): ?string |
||
42 | |||
43 | /** |
||
44 | * @param string $id |
||
45 | * @return VehicleInterface|null |
||
46 | */ |
||
47 | public function resolve(string $id): ?VehicleInterface |
||
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | public static function getAliases(): array |
||
61 | } |
||
62 |