@@ 68-86 (lines=19) @@ | ||
65 | * @param array $config |
|
66 | * @return Extension $this |
|
67 | */ |
|
68 | private function configureUnderscoredBundlePrefixNamer(ContainerBuilder $container, array $config) |
|
69 | { |
|
70 | if ( |
|
71 | $container->hasDefinition('runopencode.doctrine.orm.naming_strategy.underscored_bundle_prefix') |
|
72 | && |
|
73 | isset($config['underscored_bundle_prefix']) |
|
74 | ) { |
|
75 | $definition = $container->getDefinition('runopencode.doctrine.orm.naming_strategy.underscored_bundle_prefix'); |
|
76 | ||
77 | $config['underscored_bundle_prefix']['case'] = ('uppercase' === $config['underscored_bundle_prefix']['case']) ? CASE_UPPER : CASE_LOWER; |
|
78 | ||
79 | $args = $definition->getArguments(); |
|
80 | $args[1] = $config['underscored_bundle_prefix']; |
|
81 | ||
82 | $definition->setArguments($args); |
|
83 | } |
|
84 | ||
85 | return $this; |
|
86 | } |
|
87 | ||
88 | /** |
|
89 | * Configure 'runopencode.doctrine.orm.naming_strategy.underscored_class_namespace_prefix' naming strategy. |
|
@@ 95-113 (lines=19) @@ | ||
92 | * @param array $config |
|
93 | * @return Extension $this |
|
94 | */ |
|
95 | private function configureUnderscoredClassNamespacePrefixNamer(ContainerBuilder $container, array $config) |
|
96 | { |
|
97 | if ( |
|
98 | $container->hasDefinition('runopencode.doctrine.orm.naming_strategy.underscored_class_namespace_prefix') |
|
99 | && |
|
100 | isset($config['underscored_class_namespace_prefix']) |
|
101 | ) { |
|
102 | $definition = $container->getDefinition('runopencode.doctrine.orm.naming_strategy.underscored_class_namespace_prefix'); |
|
103 | ||
104 | $config['underscored_class_namespace_prefix']['case'] = ('uppercase' === $config['underscored_class_namespace_prefix']['case']) ? CASE_UPPER : CASE_LOWER; |
|
105 | ||
106 | $args = $definition->getArguments(); |
|
107 | $args[0] = $config['underscored_class_namespace_prefix']; |
|
108 | ||
109 | $definition->setArguments($args); |
|
110 | } |
|
111 | ||
112 | return $this; |
|
113 | } |
|
114 | ||
115 | /** |
|
116 | * Configure 'runopencode.doctrine.orm.naming_strategy.underscored_namer_collection' naming strategy. |