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