@@ 100-111 (lines=12) @@ | ||
97 | * |
|
98 | * @return InputObjectType |
|
99 | */ |
|
100 | public function getInput(string $className): InputObjectType |
|
101 | { |
|
102 | $this->throwIfNotEntity($className); |
|
103 | $key = Utils::getInputTypeName($className); |
|
104 | ||
105 | if (!isset($this->types[$key])) { |
|
106 | $instance = $this->inputTypeFactory->create($className); |
|
107 | $this->registerInstance($key, $instance); |
|
108 | } |
|
109 | ||
110 | return $this->types[$key]; |
|
111 | } |
|
112 | ||
113 | /** |
|
114 | * Returns a partial input type for the given entity |
|
@@ 153-164 (lines=12) @@ | ||
150 | * |
|
151 | * @return EntityIDType |
|
152 | */ |
|
153 | public function getId(string $className): EntityIDType |
|
154 | { |
|
155 | $this->throwIfNotEntity($className); |
|
156 | $key = Utils::getIDTypeName($className); |
|
157 | ||
158 | if (!isset($this->types[$key])) { |
|
159 | $instance = new EntityIDType($this->entityManager, $className); |
|
160 | $this->registerInstance($key, $instance); |
|
161 | } |
|
162 | ||
163 | return $this->types[$key]; |
|
164 | } |
|
165 | ||
166 | /** |
|
167 | * Register the given type in our internal registry |