Commit 85ef90fd authored by Jonathan.Wage's avatar Jonathan.Wage

Fixed connection binding so it is only put in the base class.

parent 6db25011
...@@ -684,6 +684,7 @@ END; ...@@ -684,6 +684,7 @@ END;
$topLevel['no_definition'] = true; $topLevel['no_definition'] = true;
$topLevel['generate_once'] = true; $topLevel['generate_once'] = true;
$topLevel['is_main_class'] = true; $topLevel['is_main_class'] = true;
unset($topLevel['connection']);
// Package level definition that extends from the base definition // Package level definition that extends from the base definition
if (isset($options['package'])) { if (isset($options['package'])) {
...@@ -696,6 +697,7 @@ END; ...@@ -696,6 +697,7 @@ END;
$packageLevel['override_parent'] = true; $packageLevel['override_parent'] = true;
$packageLevel['generate_once'] = true; $packageLevel['generate_once'] = true;
$packageLevel['is_package_class'] = true; $packageLevel['is_package_class'] = true;
unset($packageLevel['connection']);
} }
$baseClass = $options; $baseClass = $options;
...@@ -810,16 +812,6 @@ END; ...@@ -810,16 +812,6 @@ END;
$code = "<?php" . PHP_EOL; $code = "<?php" . PHP_EOL;
if (isset($options['requires'])) {
if ( ! is_array($options['requires'])) {
$options['requires'] = array($options['requires']);
}
foreach ($options['requires'] as $require) {
$code .= "require_once('".$require."');\n";
}
}
if (isset($options['connection']) && $options['connection']) { if (isset($options['connection']) && $options['connection']) {
$code .= "// Connection Component Binding\n"; $code .= "// Connection Component Binding\n";
$code .= "Doctrine_Manager::getInstance()->bindComponent('" . $options['connectionClassName'] . "', '" . $options['connection'] . "');\n"; $code .= "Doctrine_Manager::getInstance()->bindComponent('" . $options['connectionClassName'] . "', '" . $options['connection'] . "');\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment