1 | <?php |
||
15 | abstract class TypeLoader implements TypeLoaderInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var string[] |
||
19 | */ |
||
20 | private const DEFAULT_SCHEMA_EXTENSIONS = [ |
||
21 | 'graphqls', |
||
22 | 'graphql', |
||
23 | 'gql', |
||
24 | ]; |
||
25 | |||
26 | /** |
||
27 | * @var array|string[] |
||
28 | */ |
||
29 | protected $fileExtensions = self::DEFAULT_SCHEMA_EXTENSIONS; |
||
30 | |||
31 | /** |
||
32 | * @param string $extension |
||
33 | * @return string |
||
34 | */ |
||
35 | private function filterExtension(string $extension): string |
||
39 | |||
40 | /** |
||
41 | * @param string $extension |
||
42 | * @return TypeLoader|$this |
||
43 | */ |
||
44 | public function withExtension(string $extension): self |
||
50 | |||
51 | /** |
||
52 | * @param string $extension |
||
53 | * @return TypeLoader|$this |
||
54 | */ |
||
55 | public function withoutExtension(string $extension): self |
||
67 | } |
||
68 |