1 | <?php |
||
8 | class PluggableSchemaBuilder implements PluggableSchemaBuilderInterface { |
||
9 | use DependencySerializationTrait { |
||
10 | __sleep as sleepDependencies; |
||
11 | } |
||
12 | |||
13 | /** |
||
14 | * The type system plugin manager aggregator service. |
||
15 | * |
||
16 | * @var \Drupal\graphql\Plugin\GraphQL\TypeSystemPluginManagerAggregator |
||
17 | */ |
||
18 | protected $pluginManagers; |
||
19 | |||
20 | /** |
||
21 | * Static cache of type system plugin instances. |
||
22 | * |
||
23 | * @var \Drupal\graphql\Plugin\GraphQL\TypeSystemPluginInterface |
||
24 | */ |
||
25 | protected $instances = []; |
||
26 | |||
27 | /** |
||
28 | * PluggableSchemaBuilder constructor. |
||
29 | * |
||
30 | * @param \Drupal\graphql\Plugin\GraphQL\TypeSystemPluginManagerAggregator $pluginManagers |
||
31 | * Type system plugin manager aggregator service. |
||
32 | */ |
||
33 | public function __construct(TypeSystemPluginManagerAggregator $pluginManagers) { |
||
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | */ |
||
40 | public function getInstance($pluginType, $pluginId, array $pluginConfiguration = []) { |
||
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | public function find(callable $selector, array $types) { |
||
105 | |||
106 | /** |
||
107 | * {@inheritdoc} |
||
108 | */ |
||
109 | public function findByName($name, array $types) { |
||
137 | |||
138 | /** |
||
139 | * Creates a plugin instance cache identifier. |
||
140 | * |
||
141 | * @param string $pluginType |
||
142 | * The plugin type. |
||
143 | * @param string $pluginId |
||
144 | * The plugin id. |
||
145 | * @param array $pluginConfiguration |
||
146 | * The plugin configuration. |
||
147 | * |
||
148 | * @return string |
||
149 | */ |
||
150 | protected function getCacheIdentifier($pluginType, $pluginId, array $pluginConfiguration) { |
||
158 | |||
159 | /** |
||
160 | * Recursively sorts an array. |
||
161 | * |
||
162 | * Useful for generating a cache identifiers. |
||
163 | * |
||
164 | * @param array $subject |
||
165 | * The array to sort. |
||
166 | * |
||
167 | * @return array |
||
168 | * The sorted array. |
||
169 | */ |
||
170 | protected function sortRecursive(array $subject) { |
||
180 | |||
181 | /** |
||
182 | * {@inheritdoc} |
||
183 | */ |
||
184 | public function __sleep() { |
||
188 | |||
189 | } |
||
190 |