@@ -37,17 +37,17 @@ public function load(array $configs, ContainerBuilder $container): void
37
37
38
38
$ loader = new XmlFileLoader ($ container , new FileLocator (__DIR__ .'/../Resources/config/container ' ));
39
39
40
- if (isset ($ configs [ 0 ] ['namespace ' ]['controllers ' ])) {
41
- $ controllers = $ configs [ 0 ] ['namespace ' ]['controllers ' ];
40
+ if (isset ($ config ['namespace ' ]['controllers ' ])) {
41
+ $ controllers = $ config ['namespace ' ]['controllers ' ];
42
42
if (!is_array ($ controllers )) {
43
43
$ controllers = [ $ controllers ];
44
44
}
45
45
$ namespaceController = array_map (function ($ namespace ) { return rtrim ($ namespace , '\\' ) . '\\' ; }, $ controllers );
46
46
} else {
47
47
$ namespaceController = [];
48
48
}
49
- if (isset ($ configs [ 0 ] ['namespace ' ]['types ' ])) {
50
- $ types = $ configs [ 0 ] ['namespace ' ]['types ' ];
49
+ if (isset ($ config ['namespace ' ]['types ' ])) {
50
+ $ types = $ config ['namespace ' ]['types ' ];
51
51
if (!is_array ($ types )) {
52
52
$ types = [ $ types ];
53
53
}
@@ -56,17 +56,17 @@ public function load(array $configs, ContainerBuilder $container): void
56
56
$ namespaceType = [];
57
57
}
58
58
59
- $ enableLogin = $ configs [ 0 ] ['security ' ]['enable_login ' ] ?? 'auto ' ;
60
- $ enableMe = $ configs [ 0 ] ['security ' ]['enable_me ' ] ?? 'auto ' ;
59
+ $ enableLogin = $ config ['security ' ]['enable_login ' ] ?? 'auto ' ;
60
+ $ enableMe = $ config ['security ' ]['enable_me ' ] ?? 'auto ' ;
61
61
62
62
$ container ->setParameter ('graphqlite.namespace.controllers ' , $ namespaceController );
63
63
$ container ->setParameter ('graphqlite.namespace.types ' , $ namespaceType );
64
64
$ container ->setParameter ('graphqlite.security.enable_login ' , $ enableLogin );
65
65
$ container ->setParameter ('graphqlite.security.enable_me ' , $ enableMe );
66
- $ container ->setParameter ('graphqlite.security.introspection ' , $ configs [ 0 ] ['security ' ]['introspection ' ] ?? true );
67
- $ container ->setParameter ('graphqlite.security.maximum_query_complexity ' , $ configs [ 0 ] ['security ' ]['maximum_query_complexity ' ] ?? null );
68
- $ container ->setParameter ('graphqlite.security.maximum_query_depth ' , $ configs [ 0 ] ['security ' ]['maximum_query_depth ' ] ?? null );
69
- $ container ->setParameter ('graphqlite.security.firewall_name ' , $ configs [ 0 ] ['security ' ]['firewall_name ' ] ?? 'main ' );
66
+ $ container ->setParameter ('graphqlite.security.introspection ' , $ config ['security ' ]['introspection ' ] ?? true );
67
+ $ container ->setParameter ('graphqlite.security.maximum_query_complexity ' , $ config ['security ' ]['maximum_query_complexity ' ] ?? null );
68
+ $ container ->setParameter ('graphqlite.security.maximum_query_depth ' , $ config ['security ' ]['maximum_query_depth ' ] ?? null );
69
+ $ container ->setParameter ('graphqlite.security.firewall_name ' , $ config ['security ' ]['firewall_name ' ] ?? 'main ' );
70
70
71
71
$ loader ->load ('graphqlite.xml ' );
72
72
0 commit comments