Adding the propel connection to the dependency injection container
This commit is contained in:
parent
f74c659f24
commit
1777dc4a9d
|
@ -121,6 +121,12 @@ class PropelExtension extends Extension
|
|||
}
|
||||
|
||||
$container->getDefinition('propel.configuration')->setArguments(array($c));
|
||||
|
||||
$container
|
||||
->getDefinition('propel.connection')
|
||||
->setArguments(array($name)
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
<parameters>
|
||||
<parameter key="propel.dbal.default_connection">default</parameter>
|
||||
<parameter key="propel.connection.class">PDO</parameter>
|
||||
<parameter key="propel.connection_factory.class">Propel</parameter>
|
||||
<parameter key="propel.configuration.class">PropelConfiguration</parameter>
|
||||
<parameter key="propel.logger.class">Propel\PropelBundle\Logger\PropelLogger</parameter>
|
||||
<parameter key="propel.data_collector.class">Propel\PropelBundle\DataCollector\PropelDataCollector</parameter>
|
||||
|
@ -17,6 +19,8 @@
|
|||
<services>
|
||||
<service id="propel.configuration" class="%propel.configuration.class%" />
|
||||
|
||||
<service id="propel.connection" class="%propel.connection.class%" factory-class="%propel.connection_factory.class%" factory-method="getConnection" abstract="false" />
|
||||
|
||||
<service id="propel.build_properties" class="%propel.build_properties.class%" />
|
||||
|
||||
<service id="propel.logger" class="%propel.logger.class%">
|
||||
|
|
Loading…
Reference in a new issue