Revert "Injected propel.connection in the PropelDataCollector collector"

This reverts commit 284dfeb355.
This commit is contained in:
William DURAND 2011-04-13 18:07:53 +02:00
parent 00c97f3c17
commit 3ee928ea19
2 changed files with 2 additions and 10 deletions

View file

@ -31,12 +31,6 @@ class PropelDataCollector extends DataCollector
* @var \PropelConfiguration * @var \PropelConfiguration
*/ */
protected $propelConfiguration; protected $propelConfiguration;
/**
* Propel connection
*
* @var \PropelPDO
*/
protected $propelConnection;
/** /**
* Constructor * Constructor
@ -44,12 +38,11 @@ class PropelDataCollector extends DataCollector
* @param \Propel\PropelBundle\Logger\PropelLogger $logger A PropelLogger * @param \Propel\PropelBundle\Logger\PropelLogger $logger A PropelLogger
* @param string $connectionName A connection name * @param string $connectionName A connection name
*/ */
public function __construct(\Propel\PropelBundle\Logger\PropelLogger $logger, $connectionName, \PropelConfiguration $propelConfiguration, \PropelPDO $propelConnection) public function __construct(\Propel\PropelBundle\Logger\PropelLogger $logger, $connectionName, \PropelConfiguration $propelConfiguration)
{ {
$this->logger = $logger; $this->logger = $logger;
$this->connectionName = $connectionName; $this->connectionName = $connectionName;
$this->propelConfiguration = $propelConfiguration; $this->propelConfiguration = $propelConfiguration;
$this->propelConnection = $propelConnection;
} }
/** /**
@ -60,7 +53,7 @@ class PropelDataCollector extends DataCollector
{ {
$this->data = array( $this->data = array(
'queries' => $this->buildQueries(), 'queries' => $this->buildQueries(),
'querycount' => $this->propelConnection->getQueryCount(), 'querycount' => \Propel::getConnection($this->connectionName)->getQueryCount(),
'connectionName' => $this->connectionName, 'connectionName' => $this->connectionName,
); );
} }

View file

@ -24,7 +24,6 @@
<argument type="service" id="propel.logger" /> <argument type="service" id="propel.logger" />
<argument>%propel.dbal.default_connection%</argument> <argument>%propel.dbal.default_connection%</argument>
<argument type="service" id="propel.configuration" /> <argument type="service" id="propel.configuration" />
<argument type="service" id="propel.connection" />
</service> </service>
</services> </services>
</container> </container>