|
@@ 43-65 (lines=23) @@
|
| 40 |
|
* @param array $config |
| 41 |
|
* @return Extension $this |
| 42 |
|
*/ |
| 43 |
|
private function configureUnderscoredBundlePrefixNamer(ContainerBuilder $container, array $config) |
| 44 |
|
{ |
| 45 |
|
if ( |
| 46 |
|
$container->hasDefinition('run_open_code.doctrine.orm.naming_strategy.underscored_bundle_prefix') |
| 47 |
|
&& |
| 48 |
|
isset($config['underscored_bundle_prefix']) |
| 49 |
|
) { |
| 50 |
|
$definition = $container->getDefinition('run_open_code.doctrine.orm.naming_strategy.underscored_bundle_prefix'); |
| 51 |
|
|
| 52 |
|
if ($config['underscored_bundle_prefix']['case'] == 'uppercase') { |
| 53 |
|
$config['underscored_bundle_prefix']['case'] = CASE_UPPER; |
| 54 |
|
} else { |
| 55 |
|
$config['underscored_bundle_prefix']['case'] = CASE_LOWER; |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
$args = $definition->getArguments(); |
| 59 |
|
$args[1] = $config['underscored_bundle_prefix']; |
| 60 |
|
|
| 61 |
|
$definition->setArguments($args); |
| 62 |
|
} |
| 63 |
|
|
| 64 |
|
return $this; |
| 65 |
|
} |
| 66 |
|
|
| 67 |
|
/** |
| 68 |
|
* Configure 'run_open_code.doctrine.orm.naming_strategy.underscored_class_namespace_prefix' naming strategy. |
|
@@ 74-96 (lines=23) @@
|
| 71 |
|
* @param array $config |
| 72 |
|
* @return Extension $this |
| 73 |
|
*/ |
| 74 |
|
private function configureUnderscoredClassNamespacePrefixNamer(ContainerBuilder $container, array $config) |
| 75 |
|
{ |
| 76 |
|
if ( |
| 77 |
|
$container->hasDefinition('run_open_code.doctrine.orm.naming_strategy.underscored_class_namespace_prefix') |
| 78 |
|
&& |
| 79 |
|
isset($config['underscored_class_namespace_prefix']) |
| 80 |
|
) { |
| 81 |
|
$definition = $container->getDefinition('run_open_code.doctrine.orm.naming_strategy.underscored_class_namespace_prefix'); |
| 82 |
|
|
| 83 |
|
if ($config['underscored_class_namespace_prefix']['case'] == 'uppercase') { |
| 84 |
|
$config['underscored_class_namespace_prefix']['case'] = CASE_UPPER; |
| 85 |
|
} else { |
| 86 |
|
$config['underscored_class_namespace_prefix']['case'] = CASE_LOWER; |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
$args = $definition->getArguments(); |
| 90 |
|
$args[0] = $config['underscored_class_namespace_prefix']; |
| 91 |
|
|
| 92 |
|
$definition->setArguments($args); |
| 93 |
|
} |
| 94 |
|
|
| 95 |
|
return $this; |
| 96 |
|
} |
| 97 |
|
|
| 98 |
|
/** |
| 99 |
|
* Configure 'run_open_code.doctrine.orm.naming_strategy.namer_collection' naming strategy. |