1 | <?php |
||
11 | abstract class AbstractTdbmGraphQLTypeMapper |
||
12 | { |
||
13 | /** |
||
14 | * @var ContainerInterface |
||
15 | */ |
||
16 | private $container; |
||
17 | |||
18 | /** |
||
19 | * Returns an array mapping PHP classes to GraphQL types. |
||
20 | * |
||
21 | * @return array |
||
22 | */ |
||
23 | abstract protected function getMap(): array; |
||
24 | |||
25 | public function __construct(ContainerInterface $container) |
||
29 | |||
30 | /** |
||
31 | * Maps a PHP fully qualified class name to a GraphQL type. |
||
32 | * |
||
33 | * @param string $className |
||
34 | * @return TypeInterface |
||
35 | * @throws GraphQLException |
||
36 | */ |
||
37 | public function mapClassToType(string $className): TypeInterface |
||
45 | |||
46 | /** |
||
47 | * Maps a PHP fully qualified class name to a GraphQL input type. |
||
48 | * |
||
49 | * @param string $className |
||
50 | * @return InputTypeInterface |
||
51 | * @throws GraphQLException |
||
52 | */ |
||
53 | public function mapClassToInputType(string $className): InputTypeInterface |
||
67 | } |
||
68 |